Avilith – Scripts

Reset Windows Update

Category: Windows Updates

Back to Scripts

Stops update services, deletes software distribution cache, resets BITS and update settings, and restarts services.


Write-Host "Resetting Windows Update components..." -ForegroundColor Yellow
$services = "wuauserv", "bits", "cryptsvc", "msiserver"
foreach ($svc in $services) { Stop-Service $svc -Force -ErrorAction SilentlyContinue }

Remove-Item -Recurse -Force "C:\Windows\SoftwareDistribution" -ErrorAction SilentlyContinue
Remove-Item -Recurse -Force "C:\Windows\System32\catroot2" -ErrorAction SilentlyContinue

foreach ($svc in $services) { Start-Service $svc }

Write-Host "Windows Update components reset. Please check for updates again." -ForegroundColor Green

        

Comments

Log in to leave a comment.