| « New version of Windows Server Operating System Management Pack for Operations Manager 2007 with support for Windows 2008 R2 | SCOM SPN » |
SCOM agent install Failed to uninstall SDK MOF
SCOMHave a customer with a lot of machines that have a broken WMI, so I guess I'd blog about possibilities to solve the issue for the agent installation part.
I refer to a blog posting by the Manageability Team Blog.
So, you could make a script that does something like this:
Xcopy \\aworkingmachine\c$\windows\system32\Wbem c:\windows\system32\wbem /i /y
cd \windows\system32\wbem
For /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
net stop ccmexec
net stop winmgmt
net start winmgmt
net start ccmexec
and your agent installation should now work. Or something else is wrong ![]()
You can actually test if this is the problem by:
Start wbemtest. Connect to root\wmi. enum classes and type Eventtrace. If you get an error immediately run the above commands and try again.
Additional Comment:
A reader Tolga Balci, noted to me that the command in the script should contain only one percentage sign (%s) instead of two (%%s). I remember taking the double percentage straight from one of the batch files we have running. But as it didn't work for Tolga until they changed it to the single % I adjusted that as well on this page. If in your case that doesn't run you can always try to make it %%s.
Thanks Tolga!



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