Tech Blog‎ > ‎

WMI Query - Incorrect Class on Windows 2003 R2?

posted Mar 22, 2011, 11:11 AM by Victor Zakharov   [ updated Oct 10, 2012, 7:23 PM ]
I got this 'Invalid class' error when querying disk performance data (Win32_PerfFormattedData_PerfDisk_LogicalDisk).
The server was running Windows 2003 R2 Std x64 SP2, so I used this article to 'detect and repair a corrupted WMI Repository':

rundll32 wbemupgd, RepairWMISetup

Well, it did not work for some reason. A little more googling led me to a blog, where Mike (the author) suggested two additional actions:

winmgmt /resyncperf
winmgmt /clearadap 

Just executing (1) did not solve the problem for me, while doing (2) after that worked perfectly.
Perhaps, both of them were needed to succeed. Anyway, thanks Mike!