Monday, July 10, 2017

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

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.
Detection1
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.
ReturnCodes
The interval on which the application will be re-evaluated is configured in your client settings:
ClientSettings
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.
Source: https://www.mg.wtf/notify-users-who-dont-reboot-their-clients/

1 comment:

  1. The King Casino | Review of Casino | RTP - Joker
    The https://jancasino.com/review/merit-casino/ king casino review https://septcasino.com/review/merit-casino/ - everything 출장마사지 you need to know about this popular sol.edu.kg casino. www.jtmhub.com It's all about quality and quantity.

    ReplyDelete