How to Forcibly Remove MOM Agents

Tuesday, December 4, 2007
I'm currently involved with a large System Center Operations Manager (SCOM) 2007 deployment. The client is moving from MOM 2000 to SCOM 2007.

In the course of deployment we're successfully removing the MOM agent via the MOM management console, but for some reason the agent software and OnePoint service remain on the servers. This causes various WMI and other errors on the newly unmanaged servers.
To fix this, I wrote a batch file that will forcibly remove the OnePoint service and all Microsoft Operations Manager 2000 software from the target server.

The usage is: KILLMOM [TargetComputer]
@echo off
if "%1"=="" goto Syntax
echo WARNING! This command forcibly removes the MOM agent from the target server.
echo Press CTRL-C to quit or
sc \\%1 stop onepoint
ping -n 40 > nul
sc %1 stop snmp
ping -n 20 > nul
sc \\%1 delete onepoint
rd "\\%1\c$\Program Files\Microsoft Operations Manager 2000" /s /q
sc \\%1 start snmp
echo The MOM agent has been removed successfully.
goto End
echo Usage: KillMOM [servername]

I keep this batch file on the MOM DAS and run it from there. You must be an administrator on the target computer to successfully uninstall the MOM agent.

No comments:

Post a Comment

Thank you for your comment! It is my hope that you find the information here useful. Let others know if this post helped you out, or if you have a comment or further information.