/Install-WindowsUpdatesOnServers

Simplifies the Windows update workflow on servers under certain situations

Primary LanguagePowerShellMIT LicenseMIT

Install-WindowsUpdatesOnServers

Story

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.

Usage

  1. Read LICENSE

  2. Download the script. And the backup of the GPO (To deploy a task to all Servers), if you need

  3. 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"
  4. (Deploy the script via GPO after adjusting the task parameters of the GPO.)

Hints

  • 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

Note of Thanks

Thanks for the PSWindowsUpdate module ✌, because without it this script would not have been possible!