Skip to content

Instantly share code, notes, and snippets.

@kfparri
Created July 22, 2023 17:03
Show Gist options
  • Save kfparri/26779d07f8013ba7585f0b66b0415ecc to your computer and use it in GitHub Desktop.
Save kfparri/26779d07f8013ba7585f0b66b0415ecc to your computer and use it in GitHub Desktop.
Powershell script to install PSWindowsUpdate and install all available updates.
# Make sure the execution policy is set to All Signed
Set-ExecutionPolicy -ExecutionPolicy AllSigned
Write-Output "Checking to see if the Windows Update cmdlets are installed"
Install-Module PSWindowsUpdate -Confirm
Write-Output "Installing Windows Updates"
Get-WindowsUpdate -AcceptAll -Install -AutoReboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment