Maintenance Window

Question

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.

solved 0
Joe Terracciano 4 months 5 Answers 130 views Beginner 0

Answers ( 5 )

  1. 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
  2. likes like the description is automatically generated and cant be modified.

    • i have been looking at this one. https://gallery.technet.microsoft.com/scriptcenter/SCCM-2012-R2-Change-26aa591d

      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 a permission to answer to this question .