I need to extract the ASPNET\Requests Queued performance counter from some IIS servers via WMI.
The WMI class for this sort of thing appears to be contained in Win32_PerfFormattedData_ASPNET_ASPNET. I've queried all available classes in root\cimv2 on my Win 2003/IIS6 servers, and it's not listed.
It is, however, available on an unrelated Win2008/IIS7 box (which is interesting but doesn't really help me much). I can view these counters in PerfMon without any issues.
What gives? Why is this WMI class not available on my Windows 2003 servers?
Check the following registry keys and ensure "Disable Performance Counters" is either not present, or set to 0:
If you have a 32-bit OS, only the first two keys will be present. If you have a 64-bit OS, all 4 keys will be present.
I found an excellent msdn blog article which helped me: http://blogs.msdn.com/b/tom/archive/2008/04/11/asp-net-performance-counters-missing.aspx