How to Download and Install Microsoft Updates via PowerShell

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force
Install-PackageProvider -Name NuGet -Force
Install-Module -Name PSWindowsUpdate -Force
Import-Module PSWindowsUpdate
Install-WindowsUpdate -AcceptAll -AutoReboot

This will download, install and reboot the computer.  If you don’t want to reboot after installation, remove the “-AutoReboot” from the last command/line.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *