Notify users who don’t reboot their clients, using ConfigMgr 2012

By | 04.07.2017

In many environments there are users who only use standby and never restart their clients. This causes problems regarding GPO’s and installation of Windows Updates, for example.
Here’s an example of a user notification application, deployed with ConfigMgr 2012.

At first you need a collection in ConfigMgr which includes all clients with a last boot-up date older than 7 days. Of course you could deploy the application to all clients, but I prefer to deploy only to clients which actually need it.

Query LastBootUp > 7

Just save the query with “OK”. If you switch to “Show Query Design”, you’ll receive a syntax error. This is caused by the functions DateDiff() and GetDate() which aren’t supported with the query designer.

Since this query would return clients which were offline, you can limit the result by including the last hardware scan:

Now we need a script to deploy as application. This Powershell shows a popup if the last boot-up date in the WMI is older than 7 days:

Since it’s an application, we now need a dynamic detection method. This is again a Powershell script, similar to the application:

The detection returns ‘ok’, if the last boot-up date is less than 7 days ago. This is enough for the ConfigMgr to detect the deployment as installed. If the script returns nothing, it’s not detected and the application will run its Installation Program.


Detection 2

Configure “Soft Reboot” for return code 0. If the user closes the popup, the Software Center will show a reboot notification, if configured. Make sure to prevent automatic reboots in the deployment.


The interval on which the application will be re-evaluated is configured in your client settings:


If you want the reboot notification to show up on the clients every day, but don’t want to run a daily re-evaluation task, you have to use a package instead of an application.

2 thoughts on “Notify users who don’t reboot their clients, using ConfigMgr 2012

  1. Hryhorii

    It’s a very usefull article 🙂 but seems the last “)” in a 1st block is extra.
    DateDiff(day, SMS_G_System_OPERATING_SYSTEM.LastBootUpTime, GetDate()) > 7)
    Thank you!!!

    1. mg Post author

      Hi, happy you liked it. Thank you, I updated it.


Leave a Reply