Tag Archives: WMI

WMI corrupt – how to reinstall/repair/fix?

  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
    Winmgmt /resetrepository %windir%\System32\wbem
  3. Re-enable the WMI service and then reboot the server to see how it goes.
    sc config winmgmt start= auto

If the problem remains, then try the following steps to rebuild the repository:

  1. Disable and stop the WMI service.
    sc config winmgmt start= disabled     (note that there is a blank between ‘=’ and ‘disabled’)
    net stop winmgmt
  2. Rename the repository folder
    (located at %windir%\System32\wbem\repository) to repository.old.
  3. Re-enable the WMI service.
    sc config winmgmt start= auto
  4. Reboot the server to see if the problem remains.

If the above steps cannot help, you may also need to check if some disk sectors or system files are corrupted. You may try “chkdsk” and “sfc /scannow” commands to see if they can help. Otherwise, you may need to reinstall the whole server.

[Source: http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/8ed26d46-9994-4052-a307-5b071805aea8]

 


An other soloution is, if you create a batfile with the following code:

 


net stop winmgmt
c:
cd %systemroot%\system32\wbem
rd /S /Q repository

regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll

mofcomp cimwin32.mof
mofcomp cimwin32.mfl
mofcomp rsop.mof
mofcomp rsop.mfl
for /f %%s in ('dir /b /s *.dll') do regsvr32 /s %%s
for /f %%s in ('dir /b *.mof') do mofcomp %%s
for /f %%s in ('dir /b *.mfl') do mofcomp %%s

 

Let this run with administartive rights.

[Source: https://kb.paessler.com/en/topic/3713-i-have-tried-a-lot-of-things-to-fix-my-wmi-what-else-can-i-try-to-avoid-reinstalling-windows]