Windows Update stuck: diagnose and fix it from the command line

A symptom-driven guide to a frozen Windows Update: check update history, repair system files and the component store, reset update components, and install via PowerShell.

WindowsupdatessystemTerminalpowershellDiagnosticsauditMedium risk
First check whether the update actually installed: list your recent updates with Get-HotFix before trying any repair.

What this covers

When a Windows update sits at the same percentage for hours, the cause is usually a corrupted cache, a wedged update service, or damaged system files. This guide walks you from diagnosis through repair to verification, using only commands you can run in an elevated terminal.

Symptom

?The update progress bar is frozen at a percentage (often 0% or a two-digit number) for a long time, Windows Update in Settings shows 'Downloading' or 'Installing' indefinitely, or the update claims to finish but the KB doesn't appear in your history.

Check which updates are already installed

Before anything else, find out whether the 'stuck' update actually landed or is genuinely missing. This tells you whether you are troubleshooting an install that never completes or one that finished but isn't showing. It worked if you see a list of recent KB numbers with install dates.

The forgotten Get-HotFix cmdlet answers 'is KBxxxxxxx installed?' in one line, locally or on remote machines.

Command
$ Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10 HotFixID, Description, InstalledOn

Repair system files with SFC

Corrupted system files are a common reason Windows Update hangs mid-install. Run a full System File Checker scan and let it replace any damaged files automatically. It worked if the scan ends with a message that no violations were found or that corrupt files were repaired.

Use the System File Checker to verify every protected Windows system file against known-good copies and automatically replace the damaged ones.

Command
$ sfc /scannow

Repair the component store with DISM

If SFC couldn't fully fix things, the underlying component store it relies on may itself be corrupted — that store is exactly what Windows Update installs from. Run DISM RestoreHealth to repair it. It worked when the operation reports the restore completed at 100%.

Use the Deployment Image Servicing and Management tool to detect and repair corruption in the Windows component store, the layer SFC depends on.

Command
$ DISM /Online /Cleanup-Image /RestoreHealth

Reset the Windows Update components

A corrupted download cache or wedged update service is the classic cause of an update stuck at a percentage. Stop the BITS, Windows Update and cryptographic services, rename the SoftwareDistribution cache, and restart the services so update downloads start fresh. It worked if all services stop and start without errors.

Stop the Windows Update related services, rename the SoftwareDistribution download cache, and restart the services.

Command
$ net stop bits
net stop wuauserv
net stop cryptsvc
ren %Systemroot%\SoftwareDistribution\DataStore DataStore.bak
ren %Systemroot%\SoftwareDistribution\Download Download.bak
net start bits
net start wuauserv
net start cryptsvc

Install the update from PowerShell instead

If Settings still won't move, bypass it entirely: the PSWindowsUpdate module searches, downloads, installs and reboots from the command line, often succeeding where the Settings app fails. It worked when the update reports installed and the machine reboots cleanly.

Search, download, install, and reboot into updates without opening Settings — ideal for RDP sessions and scripting.

Command
$ Install-Module PSWindowsUpdate -Force
Get-WindowsUpdate
Install-WindowsUpdate -AcceptAll -AutoReboot

Verify the update is now installed

After the fixes and a reboot, confirm the problematic KB number now appears in the installed-updates list with a fresh install date. Seeing that KB in the output means the problem is resolved.

Query every installed hotfix with its install date and type from PowerShell — the fastest way to confirm a specific KB number actually landed.

Command
$ Get-HotFix | Sort-Object InstalledOn -Descending | Format-Table HotFixID, Description, InstalledOn -AutoSize
!Renaming the SoftwareDistribution cache removes pending downloads — Windows will re-download them, so expect longer next-check times. DISM RestoreHealth needs a working internet connection and can take 10–20 minutes with no visible progress; don't interrupt it.

How to confirm it worked

After a reboot, list installed updates and confirm the KB number you were waiting for appears with a current install date.

Sources

  • sfc | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft documents that 'sfc /scannow' scans the integrity of all protected system files and replaces incorrect versions with correct Microsoft versions.
  • Additional resources for Windows Update - Windows Client | Microsoft Learn
    learn.microsoft.com · community · 2026-09-21
    Evidence: Stop the BITS service, the Windows Update service and the Cryptographic service... net stop bits / net stop wuauserv / net stop cryptsvc ... Restart the BITS service, the Windows Update service and the Cryptographic service. net start bits / net start wuauserv / net start cryptsvc
  • Get-HotFix - List installed hotfixes - PowerShell
    SS64 · technical · 2026-09-17
    Evidence: SS64 shows Get-HotFix usage and notes it wraps the Win32_QuickFixEngineering WMI class for querying installed updates.
  • System File Checker (sfc) - Windows CMD
    SS64 · technical · 2026-09-17
    Evidence: SS64 describes the /scannow switch as scanning all protected system files immediately and repairing problems found.
  • Net - Services, File/Print shares, Permissions command - Windows CMD
    ss64.com · technical · 2026-09-21
    Evidence: Net - Services, File/Print shares, Permissions command - Windows CMD SS64 CMD How-to NET.exe The NET Command is used to manage network resources as follows: NET ACCOUNTS, GROUP, LOCALGROUP - Account settings and group members. NET COMPUTER, CONFIG_ - Network configuration (Workstation/Server). NET FILE, SESSIONS - Manage open files and user sessions. NET HELP, HELPMSG - Help. NET PRI
  • Get-HotFix (Microsoft.PowerShell.Management)
    Microsoft Learn · vendor-doc · 2026-09-17
    Evidence: Documents Get-HotFix listing installed hotfixes, including filtering by HotFixID (KB number) or description, and querying remote computers via -ComputerName.
  • What is DISM? | Microsoft Learn
    Microsoft · vendor-doc · 2026-09-17
    Evidence: Microsoft describes DISM as a tool that services Windows images, including repairing the component store of a running online image.
  • PSWindowsUpdate
    PowerShell Gallery · community · 2026-09-17
    Evidence: Module page documenting Get-WindowsUpdate and Install-WindowsUpdate cmdlets built on the Windows Update Agent API.

Last verified: 2026-09-21

Related guides