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

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

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:

EXSERVER_MbxCasHub_000001.blg
EXSERVER_MbxCasHub_000002.blg
EXSERVER_MbxCasHub_000003.blg
etc...

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

Installation

- Download and extract the Experfwiz.zip 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.

Important

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."

Examples

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 26, 2012 at 12:53 AM by mikelag, version 3