Bulent's Blog

ITIL, MOF, PMP, PRINCE2, Microsoft Technologies

What if you suspect WMI is corrupted and running winmgmt salvagerepository or resetrepository is not sufficient on Windows 2012 and Windows 8

What if you suspect WMI is corrupted and running winmgmt salvagerepository or resetrepository is not sufficient on Windows 2012 and Windows 8

  • Comments 2
  • Likes

Run the following script in cmd.exe spawn using Run As Administrator privileges:

@echo off
sc config winmgmt start= disabled
net stop winmgmt /y
%systemdrive%
cd %windir%\system32\wbem
for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s
wmiprvse /regserver
winmgmt /regserver
sc config winmgmt start= Auto
net start winmgmt
for /f %%s in ('dir /s /b *.mof *.mfl') do mofcomp %%s

Comments
Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment