In Part 1 of this series, I explained the E2K7_IndexRebuildAnalyzer.ps1 script. In this article, I will discuss the Search Rebuild Framework that Anatoly Girko and I developed. This framework was originally designed to provide our internal operations staff with a set of comprehensive validation steps and progress indicators they could leverage when performing rebuilds of content indexes.
Stage 1: Pre-Rebuild Statistics Gathering
In our environment whenever a decision is made to rebuild an Exchange Mailbox Database’s Content Index files the Operator begins by first calculating pre-rebuild statistics for the impacted store. These statistics are always written to CSV for documentation purposes and are eventually inserted into our historical data collection set. However as discussed, the use of the -CSVFile parameter) is optional. In situations where the -CSVFile parameter is not passed the corresponding output will be written to the shell console window. For best readability you should adjust both the Screen Buffer Size Width and Window Size Width of the console to properly accommodate for all of the various headers and metrics that will be outputted. This will allow you to read the values more easily in the console session. From there I typically “pipe” the output to Format-Table (ft) with the -AutoSize (-a) parameter.
Read more at source: Establishing Exchange Content Index Rebuild Baselines – Part 2