In ConfigMgr there is a new feature that hasn't gotten much attention called Maintenance Windows.  This is a feature that I have heard numerous requests for and it gets a bit closer to the infamous 'Big Red Button'.

So what is a maintenance window?  A maintenance window is a rule applied to a collection of ConfigMgr clients that prevents those clients from:

  • Executing a program, including a standard program such as setup.exe
  • Running Software Updates
  • And launching any Operating System Deployments

Except during the time defined in the maintenance window.  All other client actions still occur as scheduled such as policy refresh, inventory, package downloads, and DCM evaluation.

Sounds simple enough right?  So what else is there to consider?  The first question that is likely to come to mind is…

If maintenance windows are applied to collections does that mean that the maintenance window rules only apply to advertisements that target that same collection?  Allowing the client systems to run other advertisements if they are in other collections. 

Answer - No, the client will NOT run ANY of the above unless it is within the maintenance window(s) no matter what collection the advertisement is targeting.  But, there are two options for each advertisement that you can use to override these settings.  These options are on the Schedule tab of each advertisement in ConfigMgr and will allow you to ignore the maintenance window to run the program and ignore the maintenance window when a reboot is required. 

      Note: There are similar overrides for OS Deployments and Update Deployment packages as well.  MW1

These are checkboxes so you can choose one or both options, allowing you to install during a non-maintenance window period but prevent the reboot, or to allow both to happen outside of the specified maintenance window.  It is of course possible to have multiple maintenance windows applied to a client if you have the client in more than one collection where maintenance windows are applied, but maintenance windows do not apply to subcollections.

There are some things to watch for when you create a program that will be run by clients with maintenance windows applied to them.  First, the maximum
runtime for the program, this setting is what ConfigMgr (and SMS 2003) uses to decide when to quit monitoring a running program and move on, often times this would be left to Unknown when you create a package and program manually, instead of pointing it at a definition file, if a ConfigMgr client that has any maintenance windows applied to it and it gets a program with the estimated run time set to Unknown the program will run as long as there is enough minutes left for the countdown to complete before the maintenance window closes. Even though the value of Unknown equates to 12 hours when monitoring a programs runtime, this is evaluated as 0 when determining if a program can run within a maintenance window. This is because before the ConfigMgr client agent will allow a program to run it must be able to calculate the time it will take the program to run plus the countdown timer and subtract that time from the amount of time left in the maintenance window.  If the estimated runtime is n, and the countdown is c, and the minutes left in the maintenance windows is m, we get n + c <= m OR if n + c > m then the program might not have enough time to run before the maintenance window expires and it isn't allowed to run, and if n is unknown or 0 then it is really evaluated as 0 + c <= m and so the program will run on the client as long as it has enough minutes left to complete the countdown.

It is also important to understand that a client can be in any number of collections, and any or all of those collections can have one or more maintenance windows applied to its clients. Because of this, designing of your maintenance windows and building new collections for those maintenance windows is a very good idea. You should also devise a standard type of naming convention for the maintenance windows collections, Microsoft suggests something like MW-<collection name>, just make sure you do follow some sort of standard when naming the collections. If you need to figure out what maintenance widows a particular client has applied to it there is a ConfigMgr report that will tell you exactly that "Maintenance Windows Available to a Particular Client".

Some additional details about Maintenance Windows:

  • They can overlap building a larger total amount for running programs and reboots.
    • The total time is not a sum of both windows but will start at the earliest window start time and end at the latest window expiration time.
  • When they are configured you can set them to reoccur, giving them a start and stop date if needed.
  • You can set them for specific days, you can set them for just a single day, but then when it expires your clients will not run anything in the future until the window is deleted.
  • A single Maintenance Window should not exceed 24 hours.
  • There is an option to only apply maintenance windows to Operating System Deployments, this is set when you configure the maintenance window.
  • If advertisement X does not have enough time to complete before the maintenance window expires but other advertisements Y and Z scheduled to run after X do have enough time complete, Y and Z will run and during the next maintenance window X will try again.

If you want to experiment with maintenance windows you can follow these steps to create one or more:MW2

  1. Create a test collection, making sure to use your naming convention
  2. Right click on the collection and select Modify Collection Settings
  3. Then on the Maintenance Window tab click the starburst button to open the new maintenance window dialogue
  4. Fill in a name for the window
  5. Select the date you want the window to start
  6. Then the time for the window to open (start) and close (end)
  7. Select the reoccurrence setting you desire
  8. And then click the OK button

    Notice the checkbox for setting this to only apply to OSD.

MW3

To watch the magic on the client side, navigate to \\clientComputer\admin$\system32\ccm\logs\execmgr.log

And then create a mandatory ad to run prior to the maintenance window being open and you should see the execution of the program being blocked.

 

Relevant Links:

About Maintenance Windows

How To Set A Maintenance Window

Program Run Scenario using Maintenance Windows

 

 

 

 

 

 

Regards,
Anthony

Anthony Clendenen | Solutions Engineer | 1E


image002

http://configmgr.com

© 2007 Anthony Clendenen


 



Trackbacks

No Trackbacks

Comments

No Comments