SCCM Service Window to SCOM Maintenance Mode Automation Management Pack

This Management Pack provides SCOM Maintenance Mode Automation functionality based upon SCCM Service Windows found in WMI. It gathers the data on the Agent side delivers it to the Agent's Management Server to place the system into Maintenance Mode. It accounts for SW Overlap also

394 times
Add to favorites
System Center
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Maintenance mode delay
    1 Posts | Last post December 11, 2019
    • Hi,
      First off, thanks for a great MP, it works well and is easy to handle.
      But as sweprs mentioned on March 20:th, the only problem i see is that agents tend to go into maintenance mode a little bit too late, sometimes after 20 - 30 minutes so the alerts slip by. We also handle more than 1000 agents.
      If this could be fixed, it would be really great. Thanks in advance!
  • Exclude Collections
    1 Posts | Last post July 26, 2019
    • Is it possible to exclude a collection from being discovered and used to control maintenance mode.  I have an issue when servers are being built and provisioned they are in a collection with a window that is 24x7 basically.  I need to keep machines in that collection from entering maintenance mode.  The machines do not remove from the collection until they enter our patching cycle so it could be days or weeks until that happens.  
  • Scalability
    1 Posts | Last post March 20, 2019
    • Hi
      We tried this MP in our test env and it worked great. However, when doing the same in production we ran into an issue. 
      We have about a 1000 agents per Management Server (all in all 2500 Windows Servers). My understanding it that you run Set-SCOMMaintenance Mode on the Management Server hosting the Agent. Since we have a patch window of a 1000+ server at once we kick 100s (maybe up to a 1000) of maintenance mode for the Management Servers to handle. 
      We saw that it couldn't cope and started to put Maintenance Mode for servers after the SCCM Windows was closed. So it doesn't seem to scale that good.
      Does the MP support cookdown? Could that be an issue?
  • MP is not working with low privileged action account
    1 Posts | Last post March 17, 2019
    • This MP is working as expected . But I observe that SQL server where we use low privileged account then I am not able to run query 
      Get-WmiObject -namespace root\ccm\ClientSDK -class CCM_ServiceWindow" | Where-Object {$_.Type -lt '6'} | Select-Object ID, StartTime, EndTime, Duration, Type . And it fails with general error .
      Any suggestion to fix this issue for SQL server running with low privileged account also not getting any failure event ID logged on server.
  • Can you explain that all is needed is to import the MP?
    1 Posts | Last post August 21, 2018
    • Once I imported the MP, I scoured everywhere for instruction as to what is next, but all that was needed was to simply import and it works. I did not find this info anywhere except discussing with you on the phone.
      Thanks again. Super helpful
      Ben J
  • Setup Assistance
    6 Posts | Last post August 21, 2018
    • This management pack is exactly what I've been looking for to help put systems in to maintenance mode for patching and to remove Orchestrator from the equation.  In testing this management pack, the systems will not go in to maintenance mode during their maintenance window.  Entries are being placed in the Operations Manager event log every 5 minutes when the server checks SCCM but the message states there are no active service windows even though the server is currently in a maintenance window set in SCCM.
      Do I need to specify what SCCM collections to look in for the maintenance window?  Do I need specific firewall ports open for this MP?  I'm obviously missing something and would appreciate some assistance.
    • First off, I have updated this MP a few times in the past few weeks to provided better detail in the event logs. 
       - What Version of the MP are you utilizing? 
       - What version of SCCM are you using? 
       - What is the OS & PowerShell version on the Client?
       - How long is the Service Windows sized for?
      This MP only depends on the Service Window information hosted in WMI on the Client that was provided by SCCM. On the Client that should be in a maintenance window, try running "Get-WmiObject -namespace root\ccm\ClientSDK -class CCM_ServiceWindow" | Where-Object {$_.Type -lt '6'} | Select-Object ID, StartTime, EndTime, Duration, Type to get all the maintenance windows that the client should be a part of and when the next time they are scheduled to run. The Type should equal one of the following:
          5 = "OSD_SERVICEWINDOW";
       Let me know what you find, I am interested in working out any kinks that may be in my logic. :-)  
    •  - What Version of the MP are you utilizing? 
       - What version of SCCM are you using?  2012 Build 1710  
       - What is the OS & PowerShell version on the Client?  Mix of 2012 R2/PS 5.0 and 2016/PS 5.1
       - How long is the Service Windows sized for?  I've tested setting the maintenance window anywhere from 30 minutes to over 2 hours.
      When I run the Get-WmiObject command on different servers that are in the maintenance window I have set, no information is returned.  With that being said, I have 16 servers in a collection that I am testing with and now 7 of those servers did go in to maintenance mode but it has taken a couple of servers up to 40 minutes to go in to maintenance mode after the start of the maintenance window.
    • Quick update.  I had a one hour maintenance window set and 11 systems ended up in maintenance mode, with a few of those not going in to maintenance mode until 10 minutes were left on the maintenance window.  All systems came out of maintenance mode when the maintenance window ended.
    • Hey Jason,
      Thanks for this MP. I think its super helpful. 
      I do have an issue though..
      I imported the MP and I did get machines/maintenance windows automatically populated. The problem is out of 600 servers with maintenance windows defined in SCCM, it only gave me the maint windows of 95 SQL servers only. I do not see any of the other 500 or so, non SQL servers listed as I would expect.
      Any reason it would not pull ALL server maint windows?
      Thanks for your help,
      Ben J
    • Ben - Thanks for the quick conversation today surrounding the functionality of this Management Pack and Scheduled Maintenance Windows in SCOM. 
      To all Users of the MP:
      Just to clear the water, the script responsible for initiating Maintenance Mode from the Agent will not create any Maintenance Schedules in SCOM. To view what systems will be going into MM at a particular time, you can run the Service Window report from the SCCM Console to get an output of the service windows to system. It was designed this way as there were config churn considerations with populating SCOM with the Maintenance Windows of "X" number of systems, as well as cross referencing SCCM for the SCCM Service Window GUID that is stored on the Agent side. There are many security and load factors to consider to try to obtain the information. 
      Thanks for the support and I hope this helps clear some questions people many be having. :-)