First published on TECHNET on Nov 06, 2018
Hello everyone, Matt Novitsch (SCCM Premier Field Engineer) with Craig McCarty (Platforms Premier Field Engineer) here to talk to you about a method of unsticking stuck Windows Updates. We have seen this several times with customers and on our own machines where Windows Updates are stuck downloading, installing, or failing to install for a variety of reasons. We found one way that fixes them all, without having too many steps, and can be done by any administrator…
So what do you need to do? Simple:
This can be done via script if by running the following in an administrative PowerShell console.
Script Disclaimer. The sample scripts provided here are not supported under any Microsoft standard support program or service. All scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose.
#Stop BITS Server
#Stop Windows Update
#Rename the Software Distribution Folder to .old the folder will be recreated when the services are restarted
Rename-Item -Path "C:\Windows\SoftwareDistribution" -NewName "C:\Windows\SoftwareDistribution.old"
#Start BITS service
#Start Windows Update
Once this script is done, restart the endpoint and check for updates again.
If you are still experiencing problems with updates you could have a corrupt or missing system file. To resolve this, you will want to run the Deployment Imaging Servicing and Management (DISM) tool followed by SFC /SCANNOW. You can do this by using the steps below.
1. Open an elevated command prompt
2. Type 'DISM.exe /Online /Cleanup-image /Restorehealth /Source: C:\GoodSource\ Windows /LimitAccess' ( C:\GoodSource should be replaced with a path to a Windows DVD or mounted ISO).
*This command can take several minutes to run.
*In cases where Windows Updates are not broken, you would be able to just run 'DISM.exe /Online /Cleanup-Image /RestoreHealth'.
In the screenshot above, I used a ISO mounted to D:\ as my source
3. When command completes run 'SFC /SCANNOW' from the elevated command prompt.
If you haven't discovered this method before, hopefully this helps you out of a jam Thanks for reading!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.