Error message "Invalid WMI class" on computers running on Windows 7 or Windows server 2008 R2
WMI is a component that is used for collecting metrics like CPU/memory/disk usage in the server. If the WMI component is corrupted, it will not be able to collect any data from the server.
Please perform the following steps to check if the WMI component is corrupted:
- Go to Run command and type wbemtest.exe
- Click Connect in the opened dialog box

- Once connected, click Query
- Type in "select * from Win32_process" under Enter Query and select Apply

- The error message "WBEM_E_NOT_FOUND" will appear if wmi is corrupted
To repair the WMI repository on Windows Vista or 2008:
Open an Administrator command prompt and run the following command:
winmgmt /salvagerepository
To repair the WMI repository on Windows 2003 or earlier:
- Close any existing WBEMTest processes on the server that is monitored
- Open an Administrator command prompt and run the following commands:
cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer
net stop winmgmt /y - Wait for five seconds and then run the following commands:
c:
cd c:\windows\system32\wbem
rd /S /Q repository
Note:: If the repository directory is not deleted, try renaming it - Copy and paste the following script in a text editor, and save the file as a .bat file.
regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
mofcomp cimwin32.mof
mofcomp cimwin32.mfl
mofcomp rsop.mof
mofcomp rsop.mfl
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
for /f %%s in ('dir /b *.mof') do mofcomp %%s
for /f %%s in ('dir /b *.mfl') do mofcomp %%s
mofcomp exwmi.mof
mofcomp -n:root\cimv2\applications\exchange wbemcons.mof
mofcomp -n:root\cimv2\applications\exchange smtpcons.mof
mofcomp exmgmt.mof - Run the .bat file from an Administrator command prompt.
- Run WBEMTest on the application server and run the failing query. For example:
SELECT * from Win32_PerfRawData_PerfProc_Process where NAME <> '_Total' - If the "Invalid Class" error persists, close any WBEMTest processes, open an Administrator command prompt, and then run these commands:
cd c:\windows\system32\wbem
ren repository repository_old
winmgmt /resyncperf
Related Articles
How to uninstall the Site24x7 Windows Server Monitoring Agent
Method 1: To uninstall the Site24x7 Windows Server Monitoring Agent, click the link below: https://staticdownloads.site24x7.com/server/Site24x7WindowsAgentUninstall.zip Unzip and execute the Uninstall.bat file in the Command Prompt as an ...
No data for service and process in Windows server monitor
If you see "No Data" for process and service metrics (such as CPU or memory usage of monitored services) in the Site24x7 Windows server monitor user interface, follow the troubleshooting steps below. Run PowerShell Commands Open PowerShell as ...
Troubleshoot the Error 404 and Error 99 for RabbitMQ
When installing the RabbitMQ plugin, you may encounter the following errors: HTTP Error 404: Not Found: This error usually occurs when Site24x7's RabbitMQ monitoring plugin attempts to access the /api/overview page of RabbitMQ, but the resource ...
API exceeded error
Why do I get an API exceeded error after a few attempts? Every API has a certain limit to the number of requests a user can hit within a period of time, called the rate limit. An error message is triggered when a user does one of the following ...
Troubleshoot the Unauthorized user (Error 401) when installing Tomcat plugins
When installing Tomcat plugins, you may encounter the following error: Unauthorized user. Does not have permissions. HTTP Error 401: This error usually occurs when the user accessing the Tomcat Manager application does not have the necessary ...