Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Related, of course, to this question.

Before discovering it was somewhat... dangerous, I installed Windows Management Framework 3.0 on a number of Windows Server 2008 R2 SP1 servers, and WMI got completely trashed on all of them.

This is what the WMI namespace looks like on a normal server (this is from Server Manager -> Configuration -> WMI Control):

Good

This is what it looks like after installing WMF 3.0:

Bad

Yeah. Everything except WMF 3.0's new features is gone.

Needless to say, nothing seems to work anymore on those servers. And no, this is not due to some strange installation error, this happened on three servers which were perfectly working before installing WMF 3.0, and on all of them the installation completed succesfully.

Admittedly, one of them had a somewhat complex setup (various System Center products and SQL Server instances)... but two of them are just plain standard domain controllers which do nothing else at all.

How can I fix this mess without having to reinstall the O.S. on these servers?

And why did it happen in the first place?

share|improve this question
    
What does "winmgmt /verifyrepository" show if you run it? –  joeqwerty Dec 17 '12 at 22:37
1  
Can a system restore from one of the checkpoints help? –  mdpc Dec 17 '12 at 22:38
    
@joeqwerty It says the repository is consistent (???). –  Massimo Dec 17 '12 at 22:45
    
@mdpc That's definitely not something I'd like to do on a domain controller... –  Massimo Dec 17 '12 at 22:45
    
So it would seem then that WMF 3 replaced the WMI repository. "Winmgmt /resetrepository" will reset repository to the state when the OS was installed, but I'm not sure I'd do that at this point. A support call to MS PSS is probably in order. –  joeqwerty Dec 17 '12 at 22:50

3 Answers 3

up vote 6 down vote accepted

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.

share|improve this answer
2  
Did you open a ticket with MS support to work through the issue? It should be free since an update was the cause. Just curious what they might recommend as a fix and it could be a worthy post here. –  TheCleaner Dec 18 '12 at 16:26
    
No, I didn't know it would have been free... and I was quite in a hurry to get those servers back in shape. Anyway, the problem seems to be fixed now... although of course I can't be 100% sure. At least there don't seem to be WMI-related errors around. –  Massimo Dec 18 '12 at 17:29
1  
Well, install it on another server and then open the ticket. ;) –  TheCleaner Dec 18 '12 at 17:35

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
share|improve this answer

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.

share|improve this answer
    
Didn't work. I got "The Windows Management Instrumentation (WMI) repository was successfully re-created by the auto-recovery mechanism." (event ID 5616) in the Event Log, but the repository is still almost empty as before. –  Massimo Dec 17 '12 at 22:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.