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
Troubleshooting tips for Quota violation and WMI error while running WMI queries and scripts
While running a script or WMI query, you may get the error message "Quota violation". This can be because the WMI provider service may have reached its quota limit. Troubleshoot by following the below steps: Go to Start > Run > type wbemtest.exe ...
Checking WMI reachability
To check WMI reachability From your On-Premise Poller installed Windows machine, go to Start > Run > wbemtest.exe and run it as an administrator. In the Windows Management Instrumentation Tester screen, click Connect. Enter the following in the ...
How do I configure a non-administrative user for windows management instrumentation (WMI) access?
If you're a user with administrator privileges on the server to be monitored, then you'll be able to connect to windows management instrumentation (WMI) by default. However, if you're a user with standard privileges, you must configure the user for ...
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 ...
Troubleshoot Error 404, Error 111, and "no host given" error when installing the Apache plugin
When installing the Apache monitoring plugin, you may encounter the following errors: Error_code : URL Error no host given: The "no host given" error message typically indicates an issue with a URL or request that lacks a hostname. If you encounter ...