Reset Windows Update components (PowerShell)
- Create a restore point before running.
PowerShell: 5.1 | Admin: yes | License: MIT
# HypertextLink — reset Windows Update cache
# License: MIT
Stop-Service -Name wuauserv,bits -Force -ErrorAction SilentlyContinue
$sd = "$env:SystemRoot\SoftwareDistribution"
$cat = "$env:SystemRoot\System32\catroot2"
if (Test-Path $sd) { Rename-Item $sd "$sd.old" -Force }
if (Test-Path $cat) { Rename-Item $cat "$cat.old" -Force }
Start-Service bits; Start-Service wuauserv
Write-Host "Reboot and check for updates."
SHA256: 597b883a580db687c476ac3330ab6e716b416c51670fd6402d06c1b145dd3b96