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.
