Rebuild a Corrupt WMI Repository

Rebuild a Corrupt WMI Repository

  •  
  •  
  •  
  •  
  •  
  •  

From time to time, many administrators have found themselves faced with a corrupt WMI repository. Here’s a quick fix. Copy/paste into a .bat file and run on the affected computer.

NET STOP WINMGMT /y

RD /S /Q C:\Windows\system32\wbem\Repository

%windir%\system32\rundll32 wbemupgd,UpgradeRepository

FOR %%i in (%windir%\system32\wbem\*.dll) do RegSvr32 -s %%i

FOR %%i in (%windir%\system32\wbem\*.exe) do %%i /RegServer

You’ll probably get a pop-up for wbemtest when you run this script because of the FOR loop including all *.exe files. Simply click “exit” when the wbemtest application launches.

Published by Aaron Guilmette

Helping companies conquer inferior technology since 1997. I spend my time developing and implementing technology solutions so people can spend less time with technology. Specialties: Active Directory and Exchange consulting and deployment, Virtualization, Disaster Recovery, Office 365, datacenter migration/consolidation, cheese.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.