ExPerfWiz is a PowerShell based script to help automate the collection of performance data on Exchange 2007, 2010 and 2013 servers.  Supported operating systems are Windows 2003, 2008, 2008 R2, 2012 and 2012 R2.

Starting with version 1.3.8, the script by default runs in “full” mode, meaning it collects all counters useful for Exchange baseline and troubleshooting, rather than the previous role-based model, which only collected counters based on the roles installed on the sever.  If role-based collection is wanted, you can use the –nofull switch for Exchange 2007 and 2010.  At this time, -nofull is not supported with Exchange 2013. 

Exchange 2013 support was added in version 1.3.8!
The default behavior 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

-begin

Specifies when you would like the ExPerfWiz data capture to begin.  The format must be specified as:

“01/00/0000 00:00:00”

-circular

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

-ConvertToCsv

Converts existing BLG files to CSV. Must include –filepath (to BLG files). This can be run from any machine with PowerShell.

-CsvFilepath

Path where converted CSV files should be stored

-delete

Deletes the currently running ExPerfWiz data collection

-duration

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

-end

Specifies when you would like the ExPerfWiz data capture to end.  The format must be specified as:

“01/00/0000 00:00:00”

-EseExtendedOn

Enables Extended ESE performance counters. Currently not supported with Exchange 2013.

-EseExtendedOff

Disables Extended ESE performance counters. Currently not supported with Exchange 2013.

-ExMon

Adds ExMon tracing to specified server.  Currently not supported with Exchange 2013.

-ExMonDuration

Sets ExMon trace duration.  If not specified, 30 minutes is the default duration.  Currently not supported with Exchange 2013.

-filepath

Sets the directory location of where the BLG file will be stored. Default Location is C:\Perflogs.

-full

This switch has been deprecated in version 1.3.8.  You can still run the script with this switch, however ExPerfWiz will ignore it as all collections are considered ‘full’ now.

-interval

Specifies the interval time between data samples. If omitted, the default value is 30 seconds.

NOTE: Exchange 2013 and Server 2012 introduced a large number of counters that were not available in previous version of Exchange/Windows.  Because of this, using a value of less than 5 will result in very large files, very quick.  Please be sure the storage location has enough space.

-maxsize

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

NOTE: Starting with v1.4, Exchange 2013 defaults to 1024MB

-nofull

Run ExPerfWiz in role-based mode.  This will collect counters based on the roles installed.  Currently not supported with Exchange 2013.

-query

Queries configuration information of previously created Exchange_Perfwiz Data Collector

-server

Creates ExPerfWiz data collector on remote server specified.  If no server is specified, the local server will be used.

-start

Starts a previously created ExPerfWiz data collection

-stop

Stops the currently running ExPerfWiz data collection.  This is useful if you need to stop ExPerfWiz before the configured duration is met.  For example, the default duration is 8 hours, however you may want to stop the collection process after only 4 hours.

-StoreExtendedOn

Enables Extended Store performance counters. Currently not supported with Exchange 2013.

-StoreExtendedOff

Disables Extended Store performance counters. Currently not supported with Exchange 2013.

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

 1.4 fixes a couple of known issues, and adds some additional functionality.  Changes include:

 - Fixed a bug that prevented circular logging from working on Windows Server 2008+

 - Added ability to convert BLG to CSV (does not need EMS, just PowerShell)

 - Updated default maxsize to 1024MB for Exchange 2013

 - Fixed a bug that prevented the script from creating a directory that did not exist on Windows 2003

 - Added/Removed various counters, most in Exchange 2013 collection set.

 - Fixed location of webhelp and updated –help syntax

 

1.3.8.1

 1.3.8.1 release was a very large update that included many changes over several internal builds.  Changes include:

 - Fixed a bug that prevented the script from running properly on Exchange 2007 CCR nodes

 - Added support for Windows 2012/Windows 2012 R2

 - Added support for Exchange 2013

 - Full mode is now enabled by default.  To disable full mode, use –nofull.  Note: -nofull is not supported on Exchange 2013.

 - Added “\Processor Information(*)\*” counters to Exchange 2010 full

 - Blocked ExMon execution on Exchange 2013

 

Exchange 2013 Notes

Exchange 2013, by default, collects daily performance logs and stores them in “\Microsoft\Exchange Server \V15\Logging\Diagnostics\DailyPerformanceLogs”.  While these logs are fantastic for providing general baselines for Exchange 2013, I’ve found that I missed the customizability and advanced collection of ExPerfWiz.  This is why we’ve added Exchange 2013 support.  ExPerfWiz runs in parallel to the daily performance logs (does not stop or delete them), however should not be relied on as a daily performance tool instead of the daily performance logs.

 Because ExPerfWiz collects many additional counters that are not collected by default by the daily performance logs, space is a major consideration.  Using an interval of less than 5 seconds will result in very large files, which accumulate very quickly.  Please be sure the storage location you choose has enough space to accomplish your end goal.

 Additionally, we recommend using a maxsize of 1024MB for the files (-maxsize 1024) because of the larger number of counters being collected.  We do not recommend exceeding 1024MB as it becomes difficult to analyze the files past this point.  Version 1.4 uses 1024MB as default maxsize for Exchange 2013.

 

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 collection type/roles installed.  For example, since “full” collection is default, the default naming convention would be similar to the following:

 EXSERVER_Full_000001.blg

 EXSERVER_Full_000002.blg

 Etc…

 When using –nofull, a server which had all 3 roles (HUB/CAS/MBX) installed would create files with names similar to the following:

EXSERVER_MbxCasHub_000001.blg

EXSERVER_MbxCasHub_000002.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 scripts directory in the Exchange installation folder. 

NOTE: ExPerfWiz is a PS1 script and can be run from any location.

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 Unrestricted using (Set-ExecutionPolicy Unrestricted)

 Files downloaded from the internet using Internet Explorer are automatically blocked from running. Follow the below steps to Unblock this script from running.

 o   Save the script file on your computer.

 o   Click Start, click My Computer, and navigate to the saved script file.

 o   Right-click the script file, and then click "Properties."

 o   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 counters based on roles that are installed. Exchange 2007/2010 only.

.\experfwiz.ps1 –nofull

 

 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.  Exchange 2007/2010 only.

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

 

 NEW functionality with v1.4 allows you to convert a directory of BLG files to CSV so that 3rd party analysis applications can be used. Note that when using this command, EMS is not required – it can be run on any computer with PowerShell installed, and –filepath is required (to specify location of BLG files).

 Examples:

 To convert BLG files in C:\PerfLogs, to CSV stored in C:\PerfLogs\Csv

 .\experfwiz.ps1 –ConvertToCsv –filepath c:\perflogs

 

To convert BLG files in C:\PerfLogs, to CSV stored in C:\Csv

 .\experfwiz.ps1 –ConvertToCsv –filepath c:\perflogs –Csvfilepath c:\csv

 

 Questions/Comments/Support/Requests

 This project is open source and many times contributed to by many people.  It is not officially supported and there is no guarantee for support.  However, if you have any questions, comments, support questions or feature requests, you may contact the current developer using the discussions tab (preferred) or via email: brenle@microsoft.com.  I will try to respond as quickly as possible.  

 

 

 

Last edited Oct 25 at 2:29 PM by brenle, version 10