Exchange 2007/2010 Performance Data Collection Script

In efforts to help streamline performance data collection on Exchange 2007/Exchange 2010 servers, I have created a powershell script that will automate the data collection for you. One of the nice features of the script is that you do not have to tell the script what roles are installed as it will automatically detect what is installed locally on the server, thus adding the appropriate counters for you. Previously, you had to manually select an XML file from here for Exchange 2007 servers and here for Exchange 2010 servers and then import it in to the performance console.

I’ve seen a lot of cases that use the previous Perfwiz utility, but unfortunately, this was originally designed to collect data for Exchange 2003 servers and was never updated to support the later versions of Exchange. This older version of Perfwiz should never be used to troubleshoot performance issues for versions later than Exchange 2003 as the pertinent counters are not being collected to accurately troubleshoot a performance issue.

During the development phase of this script, it was found that starting with Windows 2003 x64 that the log roll mechanism no longer worked properly and stopped once the maximum log file size was hit. Even though this worked previously in on Windows 2003 x86 versions, something changed on the 64-bit platform which prevented this from working. This problem is also inherent in the Windows 2008 operating system, but eventually was resolved in Windows 2008 R2. The script works around all of these issues to help you collect the right data at the right time by doing the following:

  • If Windows 2003 x64 and –circular switch not specified, then roll log to next log file once maxsize is reached or duration time is hit, whichever one is first.
  • If Windows 2008 RTM/SP1/SP2 and –circular switch not specified, then roll log every 4 hours. If Interval is set to less than 30 seconds, then roll log every hour.

IMPORTANT: To help save on the disk space consumed to write these log files out, the *default duration* is set to 8 hours. This time duration should be enough to capture most performance cases during the day, but if longer durations are needed, then refer to the switches listed in the table below to help set the desired configuration for your needs.

Listed below are the switches that can be used with this script at the time of this posting. New switches will be added as time goes on. These switches should help allow you to collect the right data at the right time and also allows the flexibility to set the appropriate settings.



-help or -?

Provides help regarding the overall usage of the script


Turns on circular logging to save on disk space. Negates default duration of 8 hours


Deletes the currently running Perfwiz data collection


Specifies the overall duration of the data collection. If omitted, the default value is (08:00:00) or 8 hours


Enables Extended ESE performance counters


Disables Extended ESE performance counters


Sets the directory location of where the blg file will be stored


Defines a counter set that includes all Counters/instances


Specifies the interval time between data samples. If omitted, the default value is (00:00:30) or 30 seconds


Specifies the maximum size of blg file in MB. If omitted, the default value is 512


Queries configuration information of previously created Exchange_Perfwiz Data Collector


Starts Exchange_Perfwiz data collection


Stops the currently running Perfwiz data collection


Enables Extended Store performance counters


Disables Extended Store performance counters


Specifies whether threads will be added to the data collection. If omitted, threads counters will not be added to the collection


Launches web help for script

For additional information, you can check out the website that includes the latest 1.3 version download at

If you have an issue with this script or have a feature suggestion, use the Discussions/Issue Tracker tabs on the Experfwiz page listed above. There are also additional examples of how to run the script with additional switches on the site.