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.
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
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.
$ Get-HotFix | Sort-Object InstalledOn -Descending | Select-Object -First 10 HotFixID, Description, InstalledOnRepair 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.
$ sfc /scannowRepair 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.
$ DISM /Online /Cleanup-Image /RestoreHealthReset 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.
$ 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 cryptsvcInstall 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.
$ Install-Module PSWindowsUpdate -Force
Get-WindowsUpdate
Install-WindowsUpdate -AcceptAll -AutoRebootVerify 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.
$ Get-HotFix | Sort-Object InstalledOn -Descending | Format-Table HotFixID, Description, InstalledOn -AutoSizeHow 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 LearnEvidence: 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 LearnEvidence: 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 - PowerShellEvidence: SS64 shows Get-HotFix usage and notes it wraps the Win32_QuickFixEngineering WMI class for querying installed updates.
- System File Checker (sfc) - Windows CMDEvidence: SS64 describes the /scannow switch as scanning all protected system files immediately and repairing problems found.
- Net - Services, File/Print shares, Permissions command - Windows CMDEvidence: 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)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 LearnEvidence: Microsoft describes DISM as a tool that services Windows images, including repairing the component store of a running online image.
- PSWindowsUpdateEvidence: Module page documenting Get-WindowsUpdate and Install-WindowsUpdate cmdlets built on the Windows Update Agent API.
Last verified: 2026-09-21
Related guides
Check your Windows drives' hardware health, scan for file system errors, and schedule a repair — all from PowerShell and the command prompt.
A Windows service that refuses to start usually has a reason hiding in the event log. Check its status and startup type, read the error, then reset it to Automatic and restart it — all from the command line.
Control what runs when Windows starts: open the Startup folder, change service startup types, and handle Fast Startup quirks.