Windows – How to work out the WMI Class name from its perfmon counter name

perfmonwindowswmi

So I have been provided with a bunch of performance counters that are housed within a particular performance object (i.e. these are not one of the default perf counters that come with Windows) and because I need to access these statistics on a remote machine, I have to use WMI to achieve this.

However, I can't work out which WMI class this particular performance object relates to (I've looked through the list of Win32_PerfRawData_* classes but there isn't anything that looks like it relates to the performance object in question at least by name).

My questions:

  1. Can a performance counter exist without a backing WMI class?
  2. How do I work out which WMI class I should query to get the perf stats I need?

Best Answer

Sometimes WMI classes may not appear automatically as they should. If you execute 'wmiadap /f' in the command prompt it will reparse all performance libraries on the system (you'll be able to see new libraries after system restart).

In a meanwhile performance counter you are looking for is one of the standard you may want to take a look at Performance Counter Classes list.