Wednesday, February 19, 2014

WMI Failure While Uninstalling Exchange 2007

I am in the middle of decommissioning our Exchange 2007 environment and running into an odd little problem. It appears that recently the WMI repository on a number of these servers has been corrupted. Including:
  • Unable to connect to wmi control. Getting Error
  • Failed to initialize all required WMI classes.
  • Win32_Processor. WMI: Invalid namespace
  • Win32_WMISetting. WMI: Invalid namespace
  • Win32_OperationSystem. WMI: Invalid namespace
This is most noticeable as it generates failures on the BGInfo screen upon logon to the server and the Exchange Environment report fails to report the free space on the database physical drives.

A call into Microsoft provided this solution and it's worked on several of my servers.


Ran the below mentioned command from an elevated command prompt

cd %windir%\system32\wbem
for /f %s in ('dir /b *.dll') do regsvr32 /s %s
regsvr32 %windir%\system32\tscfgwmi.dll
wmiprvse /regserver
winmgmt /verifyrepository 

REM Verify the above CMD ^^^ said that the repository was consistent
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
net stop winmgmt
net start winmgmt

The net stop/ net start wasn't enough to fix the WMI issues and I needed to reboot the servers.

No comments:

Post a Comment