Overview
Running Windows Update from the command line is handy for automation, remote management, and forcing an update check when the Settings app is stuck. This guide covers the built-in UsoClient commands, the PowerShell PSWindowsUpdate module, and how to install or block specific updates.
Run Windows Update from CMD or PowerShell for automation and troubleshooting.
Key Takeaways
- UsoClient triggers update scans, downloads, and installs from Command Prompt.
- The PSWindowsUpdate PowerShell module gives full control, including specific KBs.
- You can deploy updates to remote PCs with PowerShell.
- Command-line updates are ideal for scripts and headless machines.
Force an Update Check From Command Prompt
1. Open Command Prompt as administrator.
2. Start a scan for updates: UsoClient StartScan
3. Download available updates: UsoClient StartDownload
4. Install them: UsoClient StartInstall
5. (On older Windows builds, the equivalent is wuauclt /detectnow.)
Open Windows Update From the Run Box
1. Press Windows key + R.
2. Type: ms-settings:windowsupdate
3. Press Enter to open the Windows Update page, then click Check for updates.
Run Windows Update From PowerShell
1. Open PowerShell as administrator.
2. Install the module (first time): Install-Module PSWindowsUpdate -Force
3. List available updates: Get-WindowsUpdate
4. Install all: Install-WindowsUpdate -AcceptAll -AutoReboot
Install Only Specific Updates
1. With PSWindowsUpdate installed, target a KB: Get-WindowsUpdate -KBArticleID KB5034123
2. Install it: Install-WindowsUpdate -KBArticleID KB5034123 -AcceptAll
3. This installs just that update and skips the rest.
Block Specific Updates
1. Hide an update so it is not installed: Hide-WindowsUpdate -KBArticleID KB5034123
2. Unhide it later: Show-WindowsUpdate -KBArticleID KB5034123 (then it can install again).
Deploy Updates to Remote Computers
1. Ensure PSWindowsUpdate is available on the remote PC and PowerShell Remoting is enabled.
2. Run: Invoke-WUJob -ComputerName PC01 -Script { Install-WindowsUpdate -AcceptAll -AutoReboot } -Confirm:$false
3. This installs updates on the named remote computer.
Troubleshooting
Problem: UsoClient does nothing visible.
Solution: It runs silently. Check progress in Settings > Windows Update, or use the PowerShell module for detailed output.
Problem: Install-Module PSWindowsUpdate fails.
Solution: Run PowerShell as administrator and, if prompted, set the execution policy (Set-ExecutionPolicy RemoteSigned) and trust the PSGallery.
Problem: Updates are corrupted or stuck.
Solution: Reset Windows Update components: stop wuauserv and bits, rename the SoftwareDistribution folder, then restart the services and retry.
Problem: A specific update keeps failing.
Solution: Hide it with Hide-WindowsUpdate, or download the standalone package from the Microsoft Update Catalog and install it manually.
Conclusion
The command line gives you precise control over Windows Update. Use UsoClient for quick scans and installs, and the PSWindowsUpdate module when you need to target specific KBs, script updates, or manage remote machines.
</w:pBdr><w:spacing w:before="220" w:after="40"/></w:pPr><w:r><w:rPr><w:b/><w:bCs/><w:color w:val="0B5394"/><w:sz w:val="21"/><w:szCs w:val="21"/><w:rFonts w:ascii="Calibri" w:cs="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri"/></w:rPr><w:t xml:space="preserve">About TechHub
This guide is part of the TechHub Knowledge Base. For more step-by-step IT guides and support, visit techhub.com.lk.















