What to do if WMI is Corrupt?
vScope uses Windows Management Instrumentation (WMI) to query information from Windows computers. Sometimes, issues may occur during WMI scans, resulting in partial or incomplete scans, flagged as PARTIAL_OK status. This indicates that the WMI probe in vScope couldn’t complete all queries successfully on the target machine.
This guide outlines methods to detect and resolve issues in the WMI repository on the target machine.
Steps to Detect WMI Repository Problems
Using WMI Diagnosis Utility
WMIDiag is a Microsoft tool that can be used to diagnose WMI issues. Download WMIDiag here.
- Download and decompress the tool on the target machine.
- Open a command prompt with administrator rights, navigate to the folder, and run:
The output logs are stored in %TEMP%
and include details on WMI errors. The .TXT
file typically contains an overview, while .LOG
and .CSV
files provide detailed results.
Using winmgmt
Command
For Windows Vista and later versions, you can use:
If the repository is consistent, you’ll see “WMI repository is consistent.” If it’s inconsistent, proceed to repair it.
Inspecting the WMI Repository Manually
The WMI repository is stored in %WINDIR%\System32\wbem\Repository
. A typical repository should not exceed several hundred MBs. A very large repository may indicate corruption or other issues.
Fixing WMI Repository Problems
Repairing the Repository Using winmgmt
For inconsistent repositories, try salvaging or resetting the repository:
- Salvage Repository
- Reset Repository
After this, you may need to reinstall any third-party applications that rely on WMI.
Rebuilding WMI MOF Files and DLLs
If issues persist, recompile all MOF files and re-register DLLs. Copy the commands below into a .BAT
file and run it as an administrator:
Restart the computer afterward.
Ensuring WMI Performance Data is Updated
Refreshing Performance Counters
Run wmiadapt
in an elevated command prompt:
Resyncing Performance Counters
To correct corrupted counters, use:
Reloading Performance Counters
To reload the counters:
Additional Causes for Growing WMI Repository
A large or growing WMI repository might be due to RSOP logging, especially on environments with high login/logout activity like Citrix. To disable RSOP logging:
- Windows 2003: Computer Configuration > Administrative Templates > System > Group Policy > Turn off Resultant Set of Policy logging
- Windows 2008 and later: Computer Configuration > Policies > Administrative Templates > System > Group Policy > Turn off Resultant Set of Policy logging