Fixing WMI Corruption in a Windows Server
  • 09 Jan 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

Fixing WMI Corruption in a Windows Server

  • Dark
    Light
  • PDF

Article summary

Warning
This document is intended for experienced administrators. Netreo is not responsible for any adverse effects to your server or environment if you attempt these repairs. If you require assistance, please contact Netreo support.

If you've determined that the WMI repository or other system files in your Windows server are corrupt, you (or your Windows administrator) can try the following steps (in order) to resolve the problem. Remember to test at the appropriate points to avoid performing unnecessary steps.

Begin by attempting to salvage and reset the WBEM repository.

Step 1.
Disable and stop the WMI service. (Note that there is an empty space between "=" and "disabled")

sc config winmgmt start= disabled
net stop winmgmt

Step 2.
Run the following commands:

winmgmt /salvagerepository %windir%\System32\wbem
winmgmt /resetrepository %windir%\System32\wbem

Step 3.
Re-enable the WMI service and then reboot the server. (Note that there is an empty space between "=" and "auto")

sc config winmgmt start= auto

Check to see if this resolves the issue. If so, you're done.

If the problem still occurs, try the following steps to rebuild the repository.

Step 4.
Disable and stop the WMI service. (Note that there is an empty space between "=" and "disabled".)

sc config winmgmt start= disabled 
net stop winmgmt

Step 5.
Rename the repository folder (located at %windir%\System32\wbem\repository) to "repository.old".

Step 6.
Re-enable the WMI service. (Note that there is an empty space between "=" and "auto".)

sc config winmgmt start= auto

Step 7.
Reboot the server and try again. You may need to rejoin the server to the domain.

Check to see if this resolves the issue.

If the problem still occurs:

Step 8.
Try restoring the server from a recent backup.

Check to see if this resolves the issue. If so, you're done.

If you have tried all these methods and the problem is still occurring, you may have some disk sectors or system files that are corrupted.

Step 9.
Try the following commands to see if they can fix the corrupted files/sectors.

chkdsk
sfc /scannow

If none of these resolve the problem, you may need to reinstall the Windows server. Please contact Netreo support if you require additional assistance.


Was this article helpful?