Throughout my time in IT, one thing has always remained constant – Windows Updates failing. If the updates would just fail in the OS it wouldn’t be so much of a problem, but many times they will prevent you from ever logging in or shutting down. Follow these steps in order to gain access to a system that is failing updates.
I primarily deal with servers, so before even doing updates it is HIGHLY recommended to make a backup of the server prior to rebooting to install the updates. If it is a physical host, make sure you have a Windows Restore point; if it is a VM do the same or take a snapshot of the VM prior to reboot to install updates.
If the server is stuck on “reverting changes” after the update failed, try to do the following to get back in:
a. On another computer, Run – services.msc – Connect to another computer – Connect to the failed updates computer. Disable the “Windows Modules Installer” and “Windows Management Instrumentation” services. They will most likely be running and will not stop until reboot.
b. Reboot the server. It should skip anything with updates and allow you to log in – don’t!
c. On the other computer you ran services.msc on, Run – \serverNameC$. Once it is connected, go to “C:\Windows\System32\Wbem” and rename the “repository” sub folder to “repository.old” or something like that.
d. On that same machine, navigate to “C:\Windows\SoftwareDistribution” and delete all sub folders there. You can also rename these as well as Windows will consider them gone. I have heard that only the “C:\Windows\SoftwareDistribution\DatastoreLogs\edb.log” is the only file you need to delete, but I have not confirmed this.
e. Reboot the server one more time after those files are deleted. This should allow you to log in.
When this happened to me, I was able to log in, but with the services in step A weren’t running – it caused the system to freeze after log in. I couldn’t ping or access shares at all so I rebooted. I tried different Safe Mode options, but all of them booted into “reverting changes..” even though the updates had been deleted.
One of the last options you can do is find the OS CD – boot to that – Choose the option “Repair Your Computer” and go back to the backup mentioned in step 1.
After you get the system back up to the point prior to installing updates, I would run the System Update Checker Tool (W7).
Run the script found here to reset Windows Updates.
Try running sfc/scannow. If that doesn’t work, you need to download the Windows 10 iso and use “DISM /Online /Cleanup-Image /RestoreHealth /Source:repairSource\install.wim”
You can also try the basic powershell route:
Stop-Service -Name ‘wuauserv’
Remove-Item $env:windir\SoftwareDistribution\ -Force -Recurse
Start-Service -Name ‘wuauserv’