I built this script mainly to simplify my Windows Update workflow on Windows servers. Since you often have the problem that you cannot restart the server during working hours etc.
-
Read LICENSE
-
Download the script. And the backup of the GPO (To deploy a task to all Servers), if you need
-
Adjust the parameters in the script (line 1 to 6) so that they meet your requirements
- $CurrentDate = Get-Date -Format "MMddyyyy"
- $PSWindowsUpdateModuleNetworkLocaiton = ""
- $LogFile = ""
- $ServersThatAreRebootingAt1AM = "ExchangeServer","DC"
- $ServersThatAreRebootingAt2AM = "CA","DC2"
- $ServersThatAreRebootingAt3AM = "WSUS"
-
(Deploy the script via GPO after adjusting the task parameters of the GPO.)
- The PSWindowsUpdate module does not have to be preinstalled on the servers which are running the script. My script checks if it is available. If it is not available it will copy the module from a network location.
- My script installs the Windows Updates with the following PSWindowsUpdate parameters (this can be adjusted if necessary, just like the whole script):
-AcceptAll
All available updates will be installed
Thanks for the PSWindowsUpdate module ✌, because without it this script would not have been possible!