Getting error “WMI: Not Found” on a Windows 2003 Server

windows-server-2003wmi

I'm getting the following error whenever I try to view the dependencies for any service on our Windows 2003 Enterprise Server:

WMI: Not Found

So three questions pop into my head at this point:

  1. Obviously, what can I do to fix this? Hopefully the answer is not a re-pave.
  2. Is it actually possible that WMI is not installed? I didn't set this machine up so I'm not sure what the other person did.
  3. Could the WMI repository be corrupt?

So, how can I fix this? How can I tell if WMI was just not installed or if the WMI Repository is corrupt?

Best Answer

The following script can be run to rebuild a corrupt WMI
(Source: Duncan McAlynn, 2004-11-22, How Do I Rebuilt a Corrupt WMI Repository?) (Dead link. Archived version here.)

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 
echo DONE reboot 
pause