This is an old revision of the document!
Fixing Troublesome Windows Updates
CLI
The first thing to try if Windows Updates fail is:
sfc /scannow
If it doesn't complete, try something like:
chkdsk /x /f /r
y
shutdown now -t 0
then:
dism /online /cleanup-image /restorehealth
sfc /scannow
shutdown now -t 0
Servers
Windows Server 2012 R2
https://serverfault.com/questions/625332/windows-update-not-working-on-windows-2012-r2-standard
Stop the Windows Update service:
net stop wuauserv
Delete the Windows Update cache directory C:\Windows\SoftwareDistribution
Remove-Item -Recurse -Force C:\Windows\SoftwareDistribution
Restart the computer
It may require several restarts to get everything deleted from this directory
Run Windows Update manually again
It will fail almost instantly and offer to run a diagnostic tool
Download the tool and allow it to run
-
The tool will find and fix some problems
Reboot the server
Wait a while, or you may get another error
Run Windows Update
manually again
Workstations
Take these steps to reliably fix troublesome Windows Updates:
Turn off automatic updating
Reboot
Search the Internet for “Windows XX latest update client”
Download and install the latest update client for your version of Windows
Install Windows Updates