1.6 KiB
1.6 KiB
Reset Windows Update Components (PowerShell)
Two maintained scripts to fix stuck Windows Update on Windows 10/11 and Server:
- cleanlight.ps1 — quick cache cleanup (fast, minimal).
- cleanFull.ps1 — full component reset (deeper, reversible).
What each script does
-
cleanlight.ps1- Stops
wuauserv - Deletes
%WINDIR%\SoftwareDistribution\Downloadand...\Datastore - Restarts
wuauserv - Log:
C:\Windows\Temp\Wuauserv_Cleanup.log
- Stops
-
cleanFull.ps1- Stops
wuauserv,bits,cryptSvc,msiserver - Renames
%WINDIR%\SoftwareDistribution→SoftwareDistribution.old - Renames
%WINDIR%\System32\catroot2→catroot2.old - Restarts services
- Log:
C:\Windows\Temp\WUA_Reset.log
- Stops
Note: Both approaches reset the local Windows Update history view. The first scan afterward can be longer.
Requirements
- Run as Administrator on the affected device.
- Use 64-bit PowerShell path.
- Close the Windows Update UI before running.
Usage
# Light cleanup
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\Scripts\cleanlight.ps1
# Full reset
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -ExecutionPolicy Bypass -File C:\Scripts\cleanFull.ps1
After running
- Trigger a scan:
USOClient StartScan(Win10/11) or wait for the next schedule. - Optionally delete
*.oldfolders after a few days if disk space matters. - Check logs (paths above) if issues persist; see also
C:\Windows\WindowsUpdate.logandC:\Windows\Logs\CBS\CBS.log.