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:
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:
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
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 -n:root\cimv2\applications\exchange wbemcons.mof
mofcomp -n:root\cimv2\applications\exchange smtpcons.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:
ren repository repository_old
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 to collect Applications and Services Logs from Windows event logs
Site24x7 AppLogs uses the Windows Management Instrumentation (WMI) query on the Site24x7 Server Monitoring agent to fetch event logs. The WMI module requires the registry entry below to read the event logs from the Applications and Services Log ...
How to troubleshoot my Windows PowerShell Plugin?
By default, the Site24x7 monitoring Windows agent will run as a SYSTEM user. In case, if you would like to verify if the plugin script is giving the output properly as SYSTEM user, follow these steps: Download PsExec from this link and extract the ...
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 ...