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.



Comments (9)
  1. mikelag says:

    I looked at the code in the script and I am not setting a duration with the -circular switch.

    Could you post the following information

    1. The version of the script you are using. Open the script in notepad and look at the highest version number in the comments and post it here

    2. The command used to initate the script

    3. once the script is running, run .experfwiz -query and then post the top portion of the output for review? I don't need all of the counter info just the settings for the perfmon log itself.

  2. satish says:

    Does the PAL tool still work with this?

  3. Simon says:

    I want to be able to run this tool continuously as i have an intermittent problem with exchange which may only occur once a week at a random time. The only switch i have specified is the -circular option, but after 8 hours it stops logging, but from how i understood it, the counter should run continuously and then overwrite the log files every 8 hours.

    Is there a way to make this script run continuously and overwrite the log files every 8 hours?

  4. Anderson says:

    Great script Mike! Thanks.

    We shouldn't run these counters during production hrs on the actual mbx server right (to avoid any performance issues)? so will the -server switch create multiple data collectors to monitor the remote e2k10 servers?

  5. Robert says:


    is there such a script or tool that will collect a configuration of all exchange servers? Something like RAP?


  6. Javed Khan says:

    i would like to run this script from remote server and wants to collect the data from remote server itself rather enabling perfmon counters on Exchange servers. How can i use this script to accomplish this..

  7. Joe says:

    Coud this be used to collect general purpose overall base counters for a 2008 or R2 server that does NOT have Exchange installed?

  8. ashutosh says:

    script is not there

Comments are closed.

Skip to main content