Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Windows Update Command: How to Run It

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To update Windows from the command line, open Command Prompt as administrator and run wuauclt /detectnow (for older Windows 10 versions) or usoclient StartScan (for newer Windows 10 and Windows 11). These commands trigger Windows Update to check for updates, but they do not install them automatically. For a more reliable method, use the built-in Windows Update settings or PowerShell commands like Install-Module PSWindowsUpdate to manage updates. This guide walks you through the safe, official ways to use commands to check for and install Windows updates.

What You'll Need

  • A Windows 10 or Windows 11 PC with an internet connection.
  • Administrator rights on the PC (you'll need to approve elevation prompts).
  • Basic familiarity with Command Prompt or PowerShell (we'll guide you).
  • Patience: updates can take time to download and install.

Step-by-Step

  1. Open Command Prompt as administrator. Press the Windows key, type cmd, right-click Command Prompt, and select Run as administrator. Approve the User Account Control prompt. (Menu labels can differ slightly by Windows version.)
  2. Trigger a Windows Update scan. In the Command Prompt window, type usoclient StartScan and press Enter. This tells Windows Update to check for available updates. If you're on an older Windows 10 build, you might use wuauclt /detectnow instead. Wait a few minutes; the command runs in the background.
  3. Check for updates via Settings. For a graphical confirmation, open Settings > Update & Security > Windows Update (Windows 10) or Settings > Windows Update (Windows 11) and click Check for updates. This is the most reliable way to see and install updates.
  4. Use PowerShell for more control (optional). Open PowerShell as administrator (search for powershell, right-click, Run as administrator). Run Install-Module PSWindowsUpdate -Force to install a trusted module from the PowerShell Gallery. Then run Get-WindowsUpdate to list available updates, and Install-WindowsUpdate to install them. Follow on-screen prompts.
  5. Restart your PC if prompted. Many updates require a restart to finish installing. Save your work and restart when Windows asks.
  6. Verify updates were installed. Go back to Windows Update settings and check the update history, or run Get-WindowsUpdate -IsInstalled in PowerShell to see installed updates.

Common Mistakes

  • Running commands without administrator rights. Most update commands require elevation; otherwise they fail silently or show access denied.
  • Using outdated commands. wuauclt is deprecated in newer Windows versions; prefer usoclient or PowerShell.
  • Expecting commands to install updates automatically. Commands like usoclient StartScan only trigger a scan; you still need to install updates via Settings or PowerShell.
  • Ignoring restart prompts. Skipping restarts can leave updates half-installed and cause issues.
  • Disabling Windows Update service. Some guides suggest stopping services; this can break update functionality. Avoid unless you know what you're doing.

Tips

  • Use usoclient StartScan for a quick nudge, but rely on Settings for the full experience.
  • Schedule updates during off-hours to avoid interruptions: Settings > Windows Update > Advanced options > Active hours.
  • Keep your system backed up before major updates.
  • If you're comfortable with PowerShell, the PSWindowsUpdate module offers granular control.
  • Check update history to confirm what was installed and when.

Troubleshooting

If updates fail to install or the command does nothing, try these steps in order:

  1. Restart your PC and try again. A simple restart resolves many glitches.
  2. Run the Windows Update troubleshooter. Go to Settings > Update & Security > Troubleshoot > Additional troubleshooters > Windows Update > Run the troubleshooter.
  3. Check your internet connection and disk space. Updates need a stable connection and free space (typically several GB).
  4. Reset Windows Update components. Open Command Prompt as administrator and run these commands one by one, pressing Enter after each: 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. This clears the update cache; Windows will recreate it. Note: This deletes temporary update files but not your personal data.
  5. Use the Windows Update Assistant. Download it from Microsoft's official site to manually upgrade to the latest version.
  6. Check for malware. Run a full scan with Windows Security.

If problems persist, consider a repair upgrade (in-place upgrade) using official Microsoft media, but back up your files first.

Frequently Asked Questions

Can I install Windows updates entirely from the command line?

Not easily with built-in tools; commands like usoclient only trigger scans. For full control, use PowerShell with the PSWindowsUpdate module, which is official and safe.

What does wuauclt /detectnow do?

It tells the Windows Update client to check for updates immediately. However, it's deprecated in newer Windows versions and may not work; use usoclient StartScan instead.

Is it safe to use PowerShell to install updates?

Yes, if you use the official PSWindowsUpdate module from the PowerShell Gallery. Avoid unofficial scripts.

Why do I need administrator rights?

Updating Windows requires system-level changes; without admin rights, commands and settings will be blocked.

How often should I check for updates?

Windows checks automatically, but you can manually check weekly or after long periods offline.

Can I stop Windows from restarting automatically?

Yes, set active hours in Settings > Windows Update > Advanced options to prevent restarts during your work hours.