Run Windows Update from Command Line | Quick Fix Guide

Running Windows Update from the command line gives you powerful control over your system updates. Whether you’re managing multiple computers, creating automated scripts, or just prefer the command line, this guide shows you exactly how to update Windows without clicking through menus.

To run Windows Update from the Command Line in Windows 10/11, open Command Prompt as administrator and type UsoClient StartScan to check for updates, then UsoClient StartDownload to download, and UsoClient StartInstall to install them. For PowerShell, use the PSWindowsUpdate module with Install-WindowsUpdate command.

This comprehensive guide covers everything from basic update commands to advanced automation techniques. You’ll learn multiple methods that work on different Windows versions, plus solutions for common problems that stop updates from working properly.

Why Use Command Line for Windows Updates?

Before diving into the commands, let’s understand why you’d want to start Windows Update command line instead of using the regular Settings app:

Speed and Efficiency

  • Updates start immediately without navigating through multiple menus
  • Perfect for remote management through scripts
  • Batch update multiple computers at once

Automation Benefits

  • Schedule updates during off-hours
  • Create scripts for regular maintenance
  • Install Windows Update silently command line without user interaction

Troubleshooting Power

  • Fix stuck updates that won’t install normally
  • Force updates when the GUI fails
  • See detailed logs and error messages

Method 1: Using Command Prompt (CMD)

Command Prompt offers the quickest way to trigger Windows updates. Here’s how to use it effectively on Windows 10 and 11.

For Windows 10/11: UsoClient Commands

Modern Windows versions use the Update Session Orchestrator (UsoClient) instead of the older wuauclt tool. Here’s how to use it:

  1. Open Command Prompt as Administrator
    • Press Windows + X
    • Select “Windows Terminal (Admin)” or “Command Prompt (Admin)”
    • Click “Yes” when asked for permission

Check for Updates

UsoClient StartScan

  1.  This command tells Windows to look for new updates immediately.

Download Updates

UsoClient StartDownload

  1.  Downloads all found updates to your computer.

Install Updates

UsoClient StartInstall

  1.  Installs the downloaded updates on your system.

Restart Computer (if needed)

UsoClient RestartDevice

  1.  Restart your computer to complete the installation.

Important Notes About UsoClient

Unlike older tools, UsoClient doesn’t show progress on screen. To verify it’s working:

  • Open Settings > Update & Security > Windows Update
  • You should see activity there
  • Check the update history after completion

If these commands don’t work on your system, don’t worry. Some Windows builds have limited UsoClient support. Try the PowerShell method below for a more reliable solution.

For Older Windows Versions: wuauclt

If you’re using Windows 7, 8, or older Windows 10 builds, use these commands:

wuauclt /detectnow

wuauclt /updatenow

Or combine them:

wuauclt /detectnow /updatenow

Method 2: PowerShell (Most Reliable)

PowerShell provides the most control and feedback when running updates. This method works on all modern Windows versions.

Setting Up PowerShell for Updates

  1. Open PowerShell as Administrator
    • Right-click the Start button
    • Select “Windows PowerShell (Admin)”
    • Confirm the security prompt

Install the Windows Update Module

Install-Module PSWindowsUpdate

  1.  When asked, type Y and press Enter to confirm.

Allow Script Execution

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

  1.  Type Y when prompted. This lets PowerShell run update scripts.

Running Updates with PowerShell

Now you can use these powerful commands:

Check for All Updates:

Get-WindowsUpdate

This shows a list of available updates with KB numbers and descriptions.

Install All Updates:

Install-WindowsUpdate

Downloads and installs all available updates with progress shown.

Install Updates with Auto-Reboot:

Install-WindowsUpdate -AcceptAll -AutoReboot

Perfect for unattended installations.

Install Specific Update by KB Number:

Get-WindowsUpdate -KBArticleID “KB5012345” -Install

Replace KB5012345 with the actual update number.

Include Microsoft Products (Office, etc.):

Add-WUServiceManager -MicrosoftUpdate

Install-WindowsUpdate -MicrosoftUpdate

Advanced Techniques for Power Users

Silent Installation Without User Prompts

To install Windows Update silently command line, combine these PowerShell parameters:

Install-WindowsUpdate -AcceptAll -Silent -AutoReboot

This runs completely in the background without any pop-ups or confirmations.

Exclude Certain Updates

Sometimes you need to skip problematic updates:

Get-WindowsUpdate -NotKBArticle “KB5012345” -AcceptAll

Skip Driver Updates

To update Windows but skip driver updates:

Install-WindowsUpdate -NotCategory “Drivers” -AcceptAll

Schedule Updates via Task Scheduler

Create a batch file with these commands:

powershell -ExecutionPolicy Bypass -Command “Install-Module PSWindowsUpdate -Force; Install-WindowsUpdate -AcceptAll -AutoReboot”

Then schedule it using Task Scheduler for automatic overnight updates.

Troubleshooting Common Issues

“Access Denied” Errors

Always run Command Prompt or PowerShell as Administrator. Regular user accounts can’t install updates.

Commands Not Working

If UsoClient commands do nothing:

  1. Try opening Windows Update in Settings first
  2. Use the PowerShell method instead

Check if the Windows Update service is running:
sc query wuauserv

Updates Stuck or Failing

Reset Windows Update components:

net stop wuauserv

net stop cryptSvc

net stop bits

net stop msiserver

ren C:\Windows\SoftwareDistribution SoftwareDistribution.old

ren C:\Windows\System32\catroot2 catroot2.old

net start wuauserv

net start cryptSvc

net start bits

net start msiserver

PowerShell Module Won’t Install

If you see errors installing PSWindowsUpdate:

  1. Check your internet connection
  2. Update PowerShell first: Download from Microsoft
  3. Try an alternative repository:
    Register-PSRepository -Default
    Install-Module PSWindowsUpdate

Best Practices and Pro Tips

Always Create a Restore Point First

Before major updates, protect yourself:

Checkpoint-Computer -Description “Before Windows Update”

Check Update History

See what’s been installed:

Get-WUHistory -Last 10

Verify System Health Before Updating

Run these commands first:

sfc /scannow

DISM /Online /Cleanup-Image /RestoreHealth

This fixes corrupt files that might block updates.

Monitor Update Progress

For detailed logs, check:

  • C:\Windows\WindowsUpdate.log
  • Event Viewer > Windows Logs > System

Alternative Methods

Using Windows Settings Shortcut

Quick GUI access from the command line:

start ms-settings:windowsupdate

Third-Party Tools

For advanced management, consider:

Security Considerations

When running updates via the command line:

  • Always use official Microsoft update servers
  • Verify update authenticity with KB numbers
  • Never disable Windows Defender during updates
  • Keep your antivirus software active

Frequently Asked Questions

Why doesn’t wuauclt work anymore in Windows 10/11?

Microsoft replaced wuauclt with UsoClient in Windows 10 version 1703 and later. The old wuauclt commands simply don’t trigger any actions in modern Windows versions.

UsoClient (Update Session Orchestrator) handles updates differently, working more closely with Windows Update service. If you’re still using wuauclt commands, switch to UsoClient or use the PowerShell method for better results.

How do I install feature updates from command line?

Feature updates (like upgrading from Windows 10 21H2 to 22H2) require special handling. Regular update commands often skip them.

Use this PowerShell command to include feature updates:

Get-WindowsUpdate -Install -AcceptAll

If that doesn’t work, download the Windows 10 Update Assistant from Microsoft and run it with silent parameters:

Windows10Upgrade.exe /quietinstall /skipeula /auto upgrade

Can I update Windows silently without user interaction?

Yes, you can run completely silent updates using PowerShell. This command installs all updates without any prompts:

Install-WindowsUpdate -AcceptAll -Silent -IgnoreReboot

For scheduled silent updates, create a PowerShell script and run it through Task Scheduler with SYSTEM privileges. This works great for maintaining multiple computers overnight.

Why do some update commands work and others don’t?

Different Windows versions support different commands. Windows 11 and recent Windows 10 builds have limited UsoClient functionality. Some editions (like Windows 10 Home) restrict certain command-line features.

Always try PowerShell’s PSWindowsUpdate module first – it works consistently across all Windows versions. If one method fails, try another rather than repeating the same command.

How do I fix Windows Update when it’s stuck?

When updates get stuck at downloading or installing, follow these steps:

  • Stop Windows Update service: net stop wuauserv
  • Clear update cache: Delete everything in C:\Windows\SoftwareDistribution\Download
  • Restart the service: net start wuauserv
  • Force a new update check: UsoClient StartScan

If that doesn’t work, run the Windows Update troubleshooter or reset all update components using the commands in our troubleshooting section above.

Can I schedule Windows updates via command line?

Absolutely! Create a scheduled task that runs your update commands. Here’s a one-line command to create a weekly update task:

schtasks /create /tn "WeeklyUpdate" /tr "powershell -ExecutionPolicy Bypass -Command Install-WindowsUpdate -AcceptAll -AutoReboot" /sc weekly /d SUN /st 02:00 /ru SYSTEM

This runs updates every Sunday at 2 AM. Adjust the day and time to fit your needs.

What’s the difference between USOClient and wuauclt?

USOClient (Update Session Orchestrator) is the modern replacement for wuauclt (Windows Update Automatic Update Client). Key differences:

  • USOClient: Works on Windows 10/11, no visual feedback, limited commands, more reliable
  • wuauclt: Legacy tool for Windows 7/8, shows some progress, more command options, deprecated

Think of USOClient as the new, streamlined tool while wuauclt is the old Swiss Army knife. For best results on modern Windows, use PowerShell instead of either.

Conclusion

Running Windows Update from the Command Line gives you powerful control over your system maintenance. Whether you use the simple UsoClient commands in CMD or the advanced PSWindowsUpdate module in PowerShell, you now have the tools to manage updates efficiently.

Remember to always run commands as Administrator and create restore points before major updates. With these techniques, you can automate updates, troubleshoot problems, and maintain multiple computers with ease. Start using these commands today to take control of your Windows updates.

WhoIsMcAfee Avatar