PowerShell script to put servers in Maintenance Mode in SCOM 2012

Hi All,

Can anyone please provide me the PowerShell script to put agents in Maintenance Mode in SCOM 2012.

I have already tried using the script given in :http://www.systemcentercentral.com/opsmgr-2012-group-maintenance-mode-via-powershell-the-way-it-should-be/ but it doesn't seem to work.

My Scenario is :-

(1) I have created my own custom classes.

(2) I want to put all the objects in this custom class in MM.

(3) When I use the above script, it puts only "windows computer class" objects in MM.

(4) I still get SCOM alerts for "Health Service Heartbeat Failure".

July 10th, 2013 11:34am

hi 

refer below link 

http://www.opsmanager.se/2011/10/25/maintenance-mode-with-powershell-in-scom-2012/

regards

Free Windows Admin Tool Kit Click here and download it now
July 10th, 2013 11:58am

Thanks Sridhar for the reply.

But can you please help in understanding that this command put the objects of a particular class (IIS,AppPools here) in MM. does this means I will be getting SCOM alerts for other classes or not?

I am looking for a script here that puts the server in MM and I should not receive any SCOM alert for that server after that.

July 10th, 2013 12:29pm

Hi,

I think you can create a group, put the servers into it and put them in maintenance mode with the following script:

Put OM2012 Computer Group Members in Maintenance Mode

http://gallery.technet.microsoft.com/scriptcenter/Put-OM2012-Computer-Group-43902672

Thanks.
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2013 3:43am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics