Installing Windows Management Framework 3.0 basically destroyed WMI, how can I fix it without reinstalling the O.S.?

Solution 1:

I was able to at least bring back the servers to a working state by re-registering all DLLs and recompiling all .mof and .mfl files under C:\Windows\System32\wbem, as documented here.

I can't be 100% sure that the systems are fully working as they should, but at least now they are not failing miserably.

However, it still doesn't make any sense at all for WMF 3.0 to screw up things this way... and in a fairly consistent manner, too, as it happened on three different servers. Now I'm definitely scared as hell about installing it anywhere.

Solution 2:

Have you tried the various WMI rebuild scripts out there? Here is one I have used on occasion, although not recently. Note that there may be some mof files that are application specific that are not included here.

net stop winmgmt /y
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 %%s in (*.dll) do regsvr32 /s %%s 
for %%s in (*.mof) do mofcomp %%s 
for %%s in (*.mfl) do mofcomp %%s 

net stop winmgmt /y
net start winmgmt
net start sharedaccess 
net start iphlpsvc 

REM these may be system-specific.  There may be other services dependent on winmgmt that need to be restarted.
net start tmlisten 
net start VMUpgradeHelper 
net start wsrm

echo DONE reboot 
pause 

GOTO :EOF

Solution 3:

Try this:

  1. Stop the WMI service
  2. Rename (not delete) this folder: c:\windows\system32\wbem\repository (32-bit) or c:\windows\syswow64\wbem\repository (64-bit)
  3. Start the WMI service

If all goes well, a new repository folder should be created and the repository should start to rebuild.