Share via


Maintaining User-defined Business Hours during Configuration Manager Upgrades

This post explains how to use a script that will maintain user-defined Business Hours in the Configuration Manager client.

In-console updates have dramatically increased the take up of new versions of Configuration Manager, given users unprecedented ability to shape the product and delivered countless new features. One downside of this frequent change is that during a client upgrade, the user-defined Business Hours are reset to default. You can vote for this to be considered at UserVoice - Retain users settings in Software Center. i.e. Business Hours, after client upgrade. But in the meantime, I have developed a workaround!

Firstly, what are Business Hours?

Business Hours allows users to control deployments such as application installation or software updates ahead of a defined deadline. The default business hours are set to 5am - 10pm local time Monday to Friday, but are configurable by the user from Software Center.

[caption id="attachment_4817" align="aligncenter" width="500"]Software Center - Business Hours Software Center - Business Hours[/caption]

By default, when a new deployment is made available to a computer with a deadline a pop up notification will appear which gives the user the option to install the application ahead of the deadline outside of their defined business hours. To minimise disruptions, users can use Software Center to configure Configuration Manager automatically install any deployed software at the next available period outside of business hours. Business hours does not prevent an application from installing at a defined deadline. If a deadline occurs during the users defined business hours, the deployment will still run at the defined deadline time.

[caption id="attachment_4815" align="aligncenter" width="500"]Software Center - Changes Required Prompt Software Center - Changes Required Prompt[/caption]

Cool feature, right?

So, to maintain the user-defined settings, you might want to consider using a script I wrote. The script:

  • Writes non-default Business Hours settings to a registry key;
  • Restores the Business Hours settings from the registry if the client settings are reverted to default.

The only known issue with the script at the moment is that if custom registry settings are stored, but the user deliberately chooses the default settings they will be overwritten with the custom settings. The script outputs to the ConfigMgr client logs directory in CMTrace format.

[caption id="attachment_4826" align="aligncenter" width="500"]Backup Business Hours Script Log File Backup Business Hours Script Log File[/caption]

To use the script, you would schedule it to run on a schedule to periodically update the registry settings and then restore the settings if a client upgrade occurs.

The script can be found at TechNet Gallery: Backup and Restore Configuration Manager Client Business Hours

Please let me know if you have any feedback :)