Corrupt or broken performance counters for a Windows server is not a rare thing. However fixing it can be a bit more troublesome usually.
The below states the quickest and nicest fix to most performance counter related problems within the Windows server familiy.
The events in the log are usually 1001, 1008, 2001 or 2002 and for the PerfLib event source.
The below examples are for the W3SVC, inetinfo and usbperf services.
I fixed it using the below lines:
This would work on any performance counter navigating to the appropriate folder and targeting the correct .ini file.
So how to find which ini file to load? - Its not always completely obvious, as in the case with usbperf. However, on Windows server 2008 and up the following can be used to identity which .ini file. Where "usbperf" is the name of the service your looking
get-childitem -recurse *.ini | Select-String -pattern "usbperf" -context 0
The 0409 folder represents the language code, in hexadecimal of your operating system of your server. 0409 Hex = 1033 Decimal. In my case En-US.
Note: This method can vary depending on your O/S. The above would work for any server O/S supporting Powershell. For non Powershell O/S the findstr could be used:
C:\Windows\system32>findstr /s usbperf *.ini