At work, I was recently given the task of upgrading our SCOM environment from 2007 R2 to 2012 SP1. “No problem, boss!” I said boastfully. After all, upgrades are typically seamless and always go smoothly.
After I took my medicine to cure delirium, I began flowing through and reached a point where I needed to uninstall the 2007 R2 agent from a machine. However, whenever using the SCOM console, the uninstall failed for unspecific reasons. “No big deal,” I said. “I guess I will just have to manually uninstall. That should be easy!”
The medicine had apparently worn off.
When I attempted my uninstall, I ran into the following:
Alright! I’ve seen that a million times! “Error 25205 Failed to uninstall SDK MOF blah blah stuff and things I’m totally screwed.”
After 30 minutes of pure panic and 15 more of stress-eating yesterday’s donuts, I began the troubleshooting steps that eventually fixed this issue:
1) From a machine with a healthy SCOM agent, I copied mom_tracing.mof from “%ProgramFiles%\System Center Operations Manager 2007” to the same directory on my troubled machine:
2) Then, on the machine that was barking at me, I ran (from an elevated command prompt) mofcomp mom_tracing.mof:
Naturally, I ran into the above error. Time to freak out, right? Nah…we’re good. I just went to steps 3 – 5:
3) I mapped a drive on my troubled machine to %WinDir%\system32\wbem on a machine with a healthy agent and copied *.mof and *.mfl to the same directory on my local machine:
4) Then, from an elevated command prompt, I ran for /f %s in (‘dir /b *.mof *.mfl’) do mofcomp %s to compile all that I copied over:
5) Then, a quick restart of the winmgmt service and I was able to uninstall the agent:
After I cleaned up the piles of donut crumbs and changed out of my soiled drawers, I was then able to move forward knowing that I would not run into anything else that difficult during my upgrade! (Time to take my medicine again)