To run Windows Update from the command line, you can use the following commands:
- Open Command Prompt with administrative privileges.
- Run `
wuauclt /detectnow` to check for new updates and download them. - Run `
wuauclt /updatenow` to install updates. - (Optional) Run `
wuauclt /reportnow` to report back to WSUS server (if available). Alternatively, you can use PowerShell: - Type “powershell” in the search box, right-click the first one, then choose “Run as administrator” to launch PowerShell.
- Type `
Install-Module PSWindowsUpdate` to install the Windows update module. - Type `
Get-WindowsUpdate` to check for all available updates. - Enter `
Install-WindowsUpdate` to begin installing the Windows updates