Search Wiki:
ExPerfWiz is a powershell based script to help automate the collection of performance data on Exchange 2007 and Exchange 2010 servers

Experfwiz has a new location at

It is no longer necessary to pick the correct counters for the Exchange Server Roles that are installed as this script will automatically detect the roles installed and will add the appropriate counters for each role detected.

The default behaviour of the script is to create a rolling blg file that will roll to a new log when the maximum size of the log has been reached up to a maximum of 8 hours. For Windows 2008 servers, this is based on time as the -max parameter for logman.exe stops the data collection when the maximum log file size has been reached. There is logic in the script to prevent you from changing the maximum size of the blg files on Windows 2008 servers.

IMPORTANT!! The default duration is 8 hours to save on disk space meaning that the data collection will stop after 8 hours. If you should need a longer duration, please review the switches below for the best possible configuration that meets your needs.

The below table outlines what parameters Experfwiz can accept.

Parameter Description
-help or -? Provides help regarding the overall usage of the script
-circular Turns on circular logging to save on disk space. Negates default duration of 8 hours
-delete Deletes the currently running Perfwiz data collection
-duration Specifies the overall duration of the data collection. If omitted, the default value is (08:00:00) or 8 hours
-EseExtendedOn Enables Extended ESE performance counters
-EseExtendedOff Disables Extended ESE performance counters
-full Defines a counter set that includes all Counters/instances
-filepath Sets the directory location of where the blg file will be stored. Default Location is C:\Perflogs
-interval Specifies the interval time between data samples. If omitted, the default value is 30 seconds
-maxsize Specifies the maximum size of blg file in MB. If omitted, the default value is 512
-query Queries configuration information of previously created Exchange_Perfwiz Data Collector
-start Starts a previously created Exchange_Perfwiz data collection
-stop Stops the currently running Perfwiz data collection
-StoreExtendedOn Enables Extended Store performance counters
-StoreExtendedOff Disables Extended Store performance counters
-threads Specifies whether threads will be added to the data collection. If omitted, threads counters will not be added to the collection
-webhelp Launches web help for script


1.3.6 release has just been posted to the site which includes the following add/updated items. A lot of work went in to this, so please provide any feedback that you might have.

- Added -server switch to allow remote servers to be specified. If server switch is not specified, then the local server is used
- Added additional ActiveSync Counters to help track queuing and latencies
- Added -begin and -end times for scheduling purposes-Added additional error handling
- Updated function on how we obtain CMS name information
- Added function that tests remote registry access and whether or not the launching user has required permissions to access the remote servers registry
- Added check for Windows 2008 R2 servers to ensure that EMS is being launched as Administrator
- Added Exmon support (-exmon and -exmonduration)
- Added Database Counters to HUB Transport role
- Enabled Windows 2003 Log roll again. Disk space must be monitored as the duration time cannot be used at the same time that maxsize is set.
- Updated 2010 Transport counters to include DeliveryAgents.
- Updated UM, MSExchangeAB, and RPC/HTTP counters

Here are the added parameters

Parameter Description
-begin Specifies when you would like the perfmon data capture to begin. The format must be specified as "01/00/0000 00:00:00"
-end Specifies when you would like the perfmon data capture to end. The format must be specified as "01/00/0000 00:00:00"
-exmon Adds Exmon Tracing to specified server
-exmonduration Sets Exmon trace duration. If not specified, 30 minutes is the default duration. The format must be specified as 00:00:00
-server Creates Exchange_Perfwiz data collector on remote server specified. If no server is specified, the local server is used

Examples for new release

Enables Perf Data collection on remote server MBXServer with interval set to 5 seconds and set Data location to d:\Logs
.\experfwiz.ps1 -server MBXServer -interval 5 -filepath D:\Logs

Enables Perf Data collection on the local server, enabled Exmon data collection with a duration of 1 hour. Note: New ETL files are created every 5 minutes. This is hardcoded and cannot be changed
_.\experfwiz.ps1 -Exmon -exmonduration 01:00:00

Enables perf data collection on Dec 12th at 8:00AM and stops data collection on the same day at 12:00PM.
_.\experfwiz.ps1 -begin "12/12/2010 08:00:00" -end "12/12/2010 12:00:00"

Additional notes

Below are some additional notes that have some operational pieces that needs to be taken in to consideration when running the tool

- 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, then roll log every 4 hours. If Interval is set to less than 30 seconds, then roll log every hour.

File Naming Convention

BLG file naming is based on the server name and the roles installed. For example, if a server was named EXSERVER which had all 3 roles (HUB/CAS/MBX) installed, the blg file names would be similar to the following:


The default location where the blg files are stored are in the C:\Perflogs directory.


- Download and extract the file on the Downloads tab to the C:\Program Files\Microsoft\Exchange Server\Scripts directory.

Steps to launch script

- Open the Exchange Management Shell
- Type cd $exscripts
- Type .\experfwiz.ps1 with the appropriate parameters to launch the script.


Before running this script, you must do one or both of the following:

  • Set powershell's execution policy to RemoteSigned using (Set-ExecutionPolicy RemoteSigned)
  • Files downloaded from the internet using Internet Explorer are automatically blocked from running. Follow the below steps to Unblock this script from running.
    • Save the script file on your computer.
    • Click Start, click My Computer, and navigate to the saved script file.
    • Right-click the script file, and then click "Properties."
    • Click "Unblock."


Set duration to 4 hours, change interval to collect data every 5 seconds and set Data location to d:\Logs

.\experfwiz.ps1 -duration 04:00:00 -interval 5 -filepath D:\Logs

Add threads to the collection set

.\experfwiz.ps1 -threads

Stop Data collection

.\experfwiz.ps1 -stop

Create collection for all counters/instances.

.\experfwiz.ps1 -full
Last edited Jul 28 2012 at 2:15 PM  by mikelag, version 54
Jeff_Stokes wrote  Jul 10 2010 at 6:20 PM  
Awesome man, thanks a bunch!

mikelag wrote  Aug 21 2010 at 6:58 PM  
Glad you like it.

jabber wrote  Jan 6 2011 at 3:06 PM  

Any possibility of adding SP1 counters to this - in particular the throttling counter for each one of the processes?

BTW, this is an great tool that has helped me out more than a few times!!

Thanks, Jack

mikelag wrote  Jan 21 2011 at 11:42 AM  
Sure, do you have a listing of the counters that you would like to add? I can get those added in rather short time.

SimR wrote  May 10 2011 at 12:30 PM  
I want to be able to run this tool continuously as i have an intermittent problem with exchange 2010 on server 2008 64Bit Enterprise SP2 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?

iiemon1000 wrote  May 16 2011 at 1:57 AM  
Hi, Thanks for the PS that made life esay. But I have a query. I have 4 Edge Servers in DMZ but I found that I can not run this PS on an ETS server to capture the perfmon log of another ETS server. The error I am getting:

[PS] C:\Program Files\Microsoft\Exchange Server\Scripts>.\ExPerfwiz.ps1 -server
melwasmes05 -duration 00:05:00 -filepath c:\NewLog
The term 'Get-MailboxServer' is not recognized as a cmdlet, function, operable
program, or script file. Verify the term and try again.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ExPerfwiz.ps1:99 char:31
+ $Server = (Get-MailboxServer <<<< | Where-Object {$_.RedundantMachin
es -eq $server}).name
Get-ExchangeServer : The operation could not be performed because object 'melwa
smes05' could not be found on domain controller 'localhost'.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ExPerfwiz.ps1:119 char:34
+ $ExVersion = (get-exchangeserver <<<< -Identity $ServerName).AdminDispla
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x80070
At C:\Program Files\Microsoft\Exchange Server\Scripts\ExPerfwiz.ps1:128 char:38
+ $script:OSVerMajor = ((Get-WmiObject <<<< Win32_OperatingSystem -Compute
rName $ServerName).Version).Split(".")[0]
You cannot call a method on a null-valued expression.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ExPerfwiz.ps1:128 char:10
+ $script:OSVerMajor = ((Get-WmiObject Win32_OperatingSystem -ComputerName
$ServerName).Version).Split( <<<< ".")[0]
Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x80070
At C:\Program Files\Microsoft\Exchange Server\Scripts\ExPerfwiz.ps1:129 char:38
+ $script:OSVerMinor = ((Get-WmiObject <<<< Win32_OperatingSystem -Compute
rName $ServerName).Version).Split(".")[1]
You cannot call a method on a null-valued expression.
At C:\Program Files\Microsoft\Exchange Server\Scripts\ExPerfwiz.ps1:129 char:10
+ $script:OSVerMinor = ((Get-WmiObject Win32_OperatingSystem -ComputerName
$ServerName).Version).Split( <<<< ".")[1]

ERROR: The network path was not found.

I have to run the PS locally to have the perfmon data of that local ETS server. Is there any way, I can get the pferfmon data for the remote ETS server or its a limitation of the script? Will appreciate any thoughts.



MubashirMir wrote  Jul 4 2011 at 9:52 AM  
Hi Mike..
This is a wonderful script and has made life easy in terms of collecting performance data, thank you for your efforts on this.
I ran this srcipt on windows server 2008 R2 running exchange 2010 SP1 and it works fine for me and if i run this script on windows server 2003 running exchange 2007 Sp3 on top of it it doesnt seem to create any blg file, i tried giving -filepath and without it also it doesnt create any log file, it seems script has started running but no file created, is it default behavior that the script doesnt work on windows server 2003 or it is something i need to figureout on my server.


Nagaraj wrote  Jul 11 2011 at 11:08 AM  
Hi Mike,
while running this script on windows 2008 server getting a error "The file experfwiz.ps11 is not digitally signed. The script will not execute on the system. Please see "get-help about_signing" for more details."
Any idea about the error?

iiemon1000 wrote  Sep 30 2011 at 3:12 AM  
Yes, I faced the same issue. Run:
Set-ExecutionPolicy Unrestricted. This will allow to run the script.
and then unblock the file as stated in the above procedures.
Execute experwiz.ps1 with the proper parameters. Hope this will help you.

SuneshES wrote  May 9 2012 at 11:33 PM  
The -circular does not negate the default duration of 8 hours as suggested. If i look at the prop of the exchange_perfwiz, i still show 8 hrs. Moreover the -circular does not overwrite the blg once it reaches the size. The GUI also shows the circular is not set. If we run .\ExPerfwiz.ps1 -query, it confirms the same (i.e. circular off and time set to 8 hrs). The workaround i found is to change it via GUI and restart the exchange_perfwiz. Remember the circular logging setting is not on properties of Performance counter (File tab) and not on the data collector set.


PetriX wrote  May 16 2012 at 10:30 PM  
As we all are not from US, may I kindly ask to change the examples with the dates:

Case 1:
Dec 12th at 8:00AM --> -begin "12/12/2010 08:00:00"

From above which one is month? First "12" or second?

Case 2:
-begin "12/12/2010 08:00:00" -end "12/12/2010 12:00:00"

How do you know which one is PM and which one is AM?

Case 3:
Examples in the scripts looks:
- Enables Data Collection to begin on January 1st 2010 at 8:00AM
.\experfwiz.ps1 -begin "01/01/2010 08:00:00"

Which "01" is month and which is day? And how it can say it will start at 8 AM or 8 PM?

PetriX wrote  May 16 2012 at 10:33 PM  
Error message when you type wrong time format looks:
Begin or enter time entered in wrong format. Ensure that the format is similar to "01/00/0000 00:00:00"

Could it be like:
Begin or enter time entered in wrong format. Ensure that the format is similar to "DD/MM/YYYY HH:MM:SS" ?

Also the parameter list at begin could be updated based on the latest update you have done, thanks for them!

PetriX wrote  May 16 2012 at 10:43 PM  
Why to limit log rolling on W2008 to one hour?
"Log Roll Duration (hh:mm:ss): 01:00:00"
What is the bug you are reference in the script?

PetriX wrote  May 16 2012 at 10:45 PM  
Have you though about file name syntax for the data files? Might be useful if capture will be performed during multiple days.

JuergenG wrote  Jul 13 2012 at 12:27 PM  
for non US users, how do we define the -begin and -end paramters?
is it 07/13/2012 for July 7th. 2012 or is it 13/07/2012?
also time. when sheduling for 2:15 pm how shell we define this? Receiving always an error in PS.
Thank you Jürgen

Page view tracker