Many people just install an antivirus software in their computers and think that it is all they need for complete protection from all the threats. While a good antivirus is an essential step towards securing your PC, it is just one of the many steps. You should also keep all the installed software and the Windows operating system itself updated. Installing the updates as soon as they are available ensures that known vulnerabilities are patched. While Windows can download and install the updates automatically, sometimes due to some configuration problems it fails to install the updates.
But now using a PowerShell script, you can fix the services and settings that could be causing the problem leading to a failure of automatic Windows updates. Here is how:
- Download the Reset-WindowsUpdate script from https://gallery.technet.microsoft.com/scriptcenter/Reset-WindowsUpdateps1-e0c5eb78.
- Download the Microsoft updates Windows8-RT-KB2937636-x64 and Windows8-RT-KB2937636-x86 from https://www.microsoft.com/en-US/download/details.aspx?id=43434 and https://www.microsoft.com/en-US/download/details.aspx?id=43433 respectively.
- Place all the downloaded files in the same folder.
- If you want to edit the script so that it can automatically reboot Windows after fixing up and cleaning up the settings, then open the Reset-WindowsUpdate.ps1 file in Notepad or Notepad++. And append these lines to the script and then save the script file:
Write-Host “Process complete. Rebooting in 60 seconds…”
shutdown /r /t 60
- In the folder where all the files are placed, click on File and select Open Windows PowerShell → Open Windows PowerShell as administrator.
- Give the following commands in the PowerShell window:
- After rebooting Windows, you have to change the execution policy for PowerShell scripts back to default by giving this command in the PowerShell (running as administrator) window:
Hopefully, this will take care of all of your Windows updates related troubles. The supplied PowerShell script cleans up the update catalog, downloaded update files, update logs and so on. Perhaps Windows will download a lot of data when your PC reboots and Windows tries to update, but it will be faster from then on.