Here’s just a quick post on removing the Event ID error 106 from your application logs on Exchange Servers.
You will properly at some point see the following in your event log:
1 2 3 4 5 |
ID: 106 Level: Error Source: MSExchange Common Machine: - Message: Performance counter updating error. Counter name is Per-Tenant KeyToRemoveBudgets Cache Size, category name is MSExchangeRemotePowershell. Optional code: 3. Exception: The exception thrown is: System.InvalidOperationException: The requested Performance Counter is not a custom counter, it has to be initialized as ReadOnly.\ |
This is caused because the performance counters cannot be loaded properly.
To correct this, do the following.Startup a PowerShell session on the server(s), first we need to make sure that we can run the script without any restrictions, therefore run the following.
1 |
Set-ExecutionPolicy ByPass |
Then run the following as a script or as a session commands.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
add-pssnapin Microsoft.Exchange.Management.PowerShell.Setup $path = "C:\Program Files\Microsoft\Exchange Server\V15\Setup\Perf" $items = Get-ChildItem -Recurse $path $files = $items | ?{$_.extension -eq ".xml"} Write-Host "Registering all perfmon counters in $path" Write-Host $count = 0; foreach ($i in $files) { $count++ $f = $i.directory, "\", $i.name -join "" Write-Host $count $f -BackgroundColor red New-PerfCounters -DefinitionFileName $f } |
Source: https://support.microsoft.com/en-us/kb/2870416
The script above can take up (at the most) 30 minutes per server.