My upgrade to SCCM SP1 went very smoothly, overall. However, luckily (ßsarcasm) for me, I inherited a bunch of Server 2003 R2 Distribution Points. Over the years, these servers have been so haphazardly patched, upgraded, downgraded and mangled that their mothers wouldn’t even recognize them. Naturally, they decided to barf all over the place after I upgraded the client agent on each machine.
Every time I logged into one, WMI would throw out the very helpful (ßsarcasm again) error blurb about how WMI doesn’t want to play anymore and wants its toys back:
Obviously, I could do the whole stop winmgmt, rename the repository directory, blah blah stuff and things. However, I was not certain that would fix my issue at all, given the neglect that these servers have seen over the years. So, I searched high and low and came across a very good script that allowed me to re-register the dll files I needed and compile them whilst rebuilding what I would have done manually. The script is as follows (copy and save as .cmd):
net stop winmgmt
rd /S /Q repository
regsvr32 /s %systemroot%\system32\scecli.dll
regsvr32 /s %systemroot%\system32\userenv.dll
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
mofcomp -n:root\cimv2\applications\exchange wbemcons.mof
mofcomp -n:root\cimv2\applications\exchange smtpcons.mof
If you run into errors during this script, you may have to locate machines with the appropriate dll and mof files and copy them to the local corresponding directories. Enjoy your new WMI build!