Created
July 22, 2023 17:03
-
-
Save kfparri/26779d07f8013ba7585f0b66b0415ecc to your computer and use it in GitHub Desktop.
Powershell script to install PSWindowsUpdate and install all available updates.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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