Maintenance Window


We currently use maintenance windows for our server patching. we have about 20 collection that we have to modify the MW on each month for the 2 weeks after patch tuesday. i was curious if anyone is using a script to change theirs each month or how you are maintaining yours. i figured if i can figure out away to use powershell to change the window with some logic somehow but my powershell skill are low so i figured  i would see if anyone might have something they are willing to share that i can start with or point me in the direction of a good reference they used.

Answers ( 5 )


    Why are you changing the MWs every month?
    Create multiple collections with the same devices and set different MWs to them and then just use the deployments to these collections as needed for the timeline required.

    Best answer

      We can only patch servers on a specific weekend each month. They want us to change it each month to make sure servers don’t reboot u expectedly.


    likes like the description is automatically generated and cant be modified.


    Have you already tried this ? anything missing there?

    Setting SCCM Maintenance Windows using PowerShell and System File Watcher



      i have been looking at this one.

      i have it working in theory but want to try to change the description but haven been able to figure out how.

      this gives me the description:
      get-CMMaintenanceWindow -CollectionId xxx000fb | select name, starttime, duration, description

      but this wont set it.
      Set-CMMaintenanceWindow -CollectionId $Collection.CollectionID -MaintenanceWindowName $MW.Name -DescriptionName “test” -Schedule $NewSchedule -IsEnabled $true

      was hoping to change the description each month also. not a show stopper but me being picky lol.

Leave an answer

Sorry, you do not have permission to answer to this question .