Fix Windows Update (Shotgun method)

Problem:

Windows updates fails to detect updates, keeps running into the same error

Store apps cannot be installed (uses WU to do this)

Run this script in an elevated PowerShell window

Set-Service wuauserv -StartupType Disabled
Set-Service BITS -StartupType Disabled
Stop-Service BITS -Force
Stop-Service wuauserv -Force
reg delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate” /v AccountDomainSid /f
reg delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate” /v PingID /f
reg delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate” /v SusClientId /f
reg delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate” /v SusClientIDValidation /f
reg delete “HKLM\SOFTWARE\policies\Microsoft\windows\WindowsUpdate” /v DisableWindowsUpdateAccess  /f
Remove-Item -recurse “C:\WINDOWS\SoftwareDistribution” -force
Set-Service BITS -StartupType automatic
Set-Service wuauserv -StartupType Manual
Start-Service BITS
Start-Service wuauserv
wuauclt /resetauthorization /detectnow
(New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow()

Note:

If the step to delete the windows\softwaredistribution folder fails, re-run the script with a pause  on the 5th line & manualy delete / empty the folder the folder

The script might return some keys not found on the reg delete’s you can safely ignore those

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.