OpsMgr 2007 – Putting computers in maintenance mode remotely

So you have a simple case where a server operator needs to perform some maintenance and he does not have an OpsMgr console. You can use the tool provided by Clive:


However the tool either runs locally on the OpsMgr server or you need to explicitly provide credentials if you want to target it at a specific OpsMgr server.

What I do is run the tool via psexec (PsExec v1.92) in such a batch file:

@Echo off
SET /P agentName=[“Please provide agent FQDN that you want to put to maintenance mode and press enter”]
SET /P MMtime=[“Please provide how long maintenance mode will be on in minutes and press enter”]

psexec -accepteula \\FQDNofYourOpsMgrServer Drive:\Folder\agentMM.exe %agentName% 4 “Automated Maintenance Mode” Now +%MMtime%m


Just put that in a batch file and distribute it along with psexec.exe to your servers. You need to make sure you have the agentMM.exe tool in Drive:\folder\ on your management server.

The downside is that you need OpsMgr Admin privilege to run it + privilege to launch the process remotely with psexec. If you cannot afford that then you need to use powershell script which allows to enable Maintenance Mode with Operator privilege:

– agent/group scheduled: CmdSchedMaint.zip

– agent/group nonscheduled: http://scom2k7.blogspot.com/2007/08/new-maintenance-mode-tool-for.html


~ by alipka on December 20, 2007.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: