placing SCCM collections in Maintenance Mode using Powershell Script

Hi All,

we are looking for a script to place several collection under maintenance using a pwershell script.

I will supply the collection, date,time,duration details either in a text file or a GUI which asks for the same details.

could you please he

August 24th, 2015 8:59am

ARe you talking about maintenance mode in Operations Manager or configuring a Maintenance Window in ConfigMgr? They are two completely different things.
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 9:06am

You want to create and assign maintenance windows to collection

You will need to first create a schedule using New-CMSchedule after that you can use Get-CMDeviceCollection to get the collection name or use a text entry or file. To end you will use New-CMMaintenanceWindow


Good info here: 

http://blog.coretech.dk/kaj/create-maintenance-windows-with-configuration-manager-

http://www.david-obrien.net/2013/04/how-to-create-configmgr-collection-maintenance-windows-powershell/

https://gallery.technet.microsoft.com/scriptcenter/Setting-Maintenance-71f47c77


August 24th, 2015 9:06am

hi all,

thank you for your reply, we are looking for SCCM 2012 @Sandys.

we want to modify the existing date of maintenance windows for several collections, we will supply the collections ID's in a text file or Excel.

Free Windows Admin Tool Kit Click here and download it now
August 24th, 2015 11:51pm

Frederick already provided you the Powershell cmdlets needed for that task. 
August 25th, 2015 1:54am

Hi Torsten,

yes, I agree with you.

I want to change only date for the existing maintenance window or need to create a new one with the date and time and remove the existing one, could some one please help me.

I have checked all the possible cmdlets, but ending up with an

Free Windows Admin Tool Kit Click here and download it now
August 25th, 2015 2:13am

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

Other recent topics Other recent topics