The Usual Tech Ramblings

Exchange and The Case of The Missing Counters

While setting up SolarWinds SAM AppInsight for Exchange, I stumbled across a small Exchange setup bug where it’s not correctly deploying all the counters for the server roles that are being used. When SAM does the checks for the performance counter, you’ll see an error like the following:

'Average Document Indexing Time'
'Performance counter not found'

The solution is fairly simple, you have to copy the counters from the install media, and register them using PowerShell. The one caveat is that the counters aren’t on all the install media, so if you have CU3 setup files for example, they are not there. You have to go back to the original install DVD and get them from there. Here are the steps:

  1. Find the missing performance counter files on the install media, usually in <install media>\setup\perf
  2. For the above counter, the files needed are:
    1. IndexAgentPerfCounters.h
    2. IndexAgentPerfCounters.ini
    3. IndexAgentPerfCounters.xml
  3. Copy the files to <install path>\Setup\perf
  4. Open a PowerShell prompt with elevated privileges
  5. Execute the following commands:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Setup
New-PerfCounters -DefinitionFileName "<install path>\Setup\Perf\IndexAgentPerfCounters.xml"

Obviously adjust <install path> to be the correct path.

This is documented on the SAM product blog (here) and in the SolarWinds Knowledge Base (here), with the missing step of Add-PSSnapin.