1. How can an agent be placed in maintenance mode from the command line? What are the other options for placing an agent or group of agents in maintenance mode?
Agents can be placed in maintenance mode from the command line in one of two ways – using command shell or using a script written by Clive Eastwood in the opsmgr product team.
The command shell scripts below are useful for putting an agent into FULL maintenance mode. The use of these scripts assumes power shell is installed on the local system, which very likely will not be the case. Please also note that it is not supported to place a RMS into maintenance mode while it is operational as an RMS. These script examples are taken from the blog post at http://scom2k7.blogspot.com/2007/08/new- maintenance - mode -tool-for.html
I mentioned that these scripts will enable FULL maintenance mode for an agent. Maintenance mode has changed notably in opsmgr. In MOM 2005 we placed a system in maintenance mode and that was it – only one type of maintenance mode. In opsmgr we have three different components (the agent, the agents health service and the agents health service watcher) that must be placed in maintenance mode to fully achieve an ‘offline’ state for the agent. You could also choose to place just one of the three components in maintenance mode – which would allow all monitoring by the other pieces not in maintenance mode to continue.
In addition to command shell any of the above agent components can be placed in maintenance mode through the UI. In addition, monitors may be placed in maintenance mode individually.