1

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?

Jared
  • 1,577
  • 2
  • 12
  • 12

2 Answers2

1

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 
StackzOfZtuff
  • 1,754
  • 12
  • 21
Ollie
  • 133
  • 6
  • The Microsoft "AskPerf" blog has a similar but more in depth post. And they warn that: *"If you suspect WMI or repository corruption, rebuilding repository is the last thing you should do."* (They suggest tryping WmiDiag.exe and some other things first.) -> [CC Hameed, 2009-04-13, Microsoft TechNet "AskPerf" blog, "WMI: Rebuilding the WMI Repository"](https://blogs.technet.microsoft.com/askperf/2009/04/13/wmi-rebuilding-the-wmi-repository/) (Archived [here](https://archive.is/xBcY8).) – StackzOfZtuff Sep 19 '16 at 07:34
0

Check out the folder %SystemRoot%\System32\Wbem\Repository\FS -- this is where your WMI repository is stored. If there are files in there, it means it is installed, but probably corrupt.

Delete everything in %SystemRoot%\System32\Wbem\Repository then reboot to fix the problem.

Alternatively, you could try Microsoft's WMI Diagnosis Utility to diagnose WMI.

StackzOfZtuff
  • 1,754
  • 12
  • 21
MattB
  • 11,124
  • 1
  • 29
  • 36
  • Actually, deleting the repository is the last thing to do, especially in a production environment, because it is likely to create further problems (if I remember correctly the documentation that comes with WMIDiag.vbs - your second link - also suggests this) I even remember a webcast by Alain Lissoir about WMI troubleshooting that begins by 'Please do not delete the repository' - I will try to find it and post the link. –  Aug 29 '09 at 08:46
  • Here is the webcast I was talking about: http://www.microsoft.com/events/series/detail/webcastdetails.aspx?seriesid=6&webcastid=1470 –  Aug 29 '09 at 11:42