Windows Update (via PowerShell command line)

Post date: Dec 03, 2019 2:53:52 PM

Install-Module PSWindowsUpdate

Set-ExecutionPolicy -ExecutionPolicy Unrestricted

Import-Module PSWindowsUpdate

Get-WindowsUpdate

Install-WindowsUpdate

usoclient.exe /StartScan, /StartDownload, /StartInstall

startdownload (download updates)

startinstall (install updates)

Refreshsettings (Refresh settings if any changes were made)

StartInteractiveScan (Open a dialog and start scanning for updates)

RestartDevice (Restart computer to finish installing updates)

ScanInstallWait (Scan, Download, and install updates)

ResumeUpdate (Resume installing updates on next boot)