Friday, May 25, 2012

wmi repository corrupt

i use wmi to create processes on a remote machine. however, I found one of machine stops responding my wmi command. It turns out that the wmi repository on that machine is corrupted. The symptom is that you cannot use wbemtest to connect to root\cimv2. You may use following to rebuild the repository.


1. Disable and stop the WMI service.
     sc config winmgmt start= disabled
     net stop winmgmt

2. Run the following commands.
     Winmgmt /salvagerepository %windir%\System32\wbem      (I noticed that you have run this command, but I would suggest that you try it again)
     Winmgmt /resetrepository %windir%\System32\wbem

4. Re-enable the WMI service and then reboot the server to see how it goes.
     sc config winmgmt start= auto


No comments: