![]() This script has been scheduled on the environment using as a task that is launched 5-10 minutes after system startup. All information is written to the EventLog of the local server/client so that after every reboot you can see what actions have been performed in the background. Inside the script there are random sleeps to prevent clients (imagine hundreds of servers being patched at the same time/day) from performing actions at the same time. In case of an active maintenance window the pending updates are being requested to be installed using the CCM_SoftwareUpdatesManager WMI class. The script below determines if there are pending updates left on the system and identifies on the client if there is an active maintenance window that has at least 1 hour left of available time. This will leave you with a server that requires manual intervention or it needs to wait until the next maintenance window. Sometimes one of the updates is left in a pending state and before the system identifies this it could be that the maintenance window is no longer valid. Imagine a server that performs updates within a maintenance window and this server performs a reboot after installation. I created this script which includes various functions because sometimes there is a pending update left on the system after the update deployment has finished.
0 Comments
Leave a Reply. |