Windows Update Services Reset
When encountering issues with Windows Update Services on a host, resetting them can help resolve corrupted files, restart stuck services, and remove temporary files no longer needed. This process is especially useful when Automox identifies a compatibility issue.
- Note: Clearing SoftwareDistribution removes update history. Copy your Windows Update Logs prior to resetting and ensure this is acceptable in your environment before proceeding.
Symptoms
If you experience the following problems, resetting Windows Update Services might resolve the issue:
- Error codes (e.g., 0x80070057) appear in the Windows Update Activity Log during patching.
- Compatibility checks in Automox report Update Services as the issue.
- Windows Update GUI on the host shows error messages.
- The Windows Update Troubleshooter flags Update Services as problematic.
- The Get-WindowsUpdateLog command outputs error codes during patching attempts.
Steps to Resolve
You can reset the Windows Update Services using one of two methods: manually or via a remote worklet.
1. Manual Execution
Run the following commands on the host using Command Prompt (Administrator) or PowerShell (Administrator):
Command Prompt Commands
Net stop bits
Net stop wuauserv
Net stop appidsvc
Net stop cryptsvc
Del %ALLUSERSPROFILE%\Microsoft\Network\Downloader\qmgr*.dat /Q
Del "%HOMEDRIVE%\Users\All Users\Microsoft\Network\Downloader\qmgr*.dat" /Q
Del %WINDIR%\SoftwareDistribution\*.* /s /Q
Net start bits
Net start wuauserv
Net start appidsvc
Net start cryptsvc
PowerShell Commands
Net stop bits
Net stop wuauserv
Net stop appidsvc
Net stop cryptsvc
Remove-Item -Path "C:\ProgramData\Microsoft\Network\Downloader\qmgr*.dat" -Force
Remove-Item -Path "C:\Users\All Users\Microsoft\Network\Downloader\qmgr*.dat" -Force
Rename-Item -Path "C:\Windows\SoftwareDistribution" -NewName "SoftwareDistribution.old" -Force
Net start bits
Net start wuauserv
Net start appidsvc
Net start cryptsvc
Get-ChildItem -LiteralPath '\\?\C:\Windows\SoftwareDistribution.old' -Recurse -Force | Remove-Item -Recurse -Force
Remove-Item -Path "C:\Windows\SoftwareDistribution.old" -Recurse -Force
2. Remote Execution
For remote environments, you can use a Worklet with the PowerShell commands provided above. This allows you to automate the reset process across multiple devices.
Additional Notes
- Command Context: Renaming SoftwareDistribution ensures a fresh database is created upon service restart.
- Troubleshooting Assistance: If these steps do not resolve the issue, reach out to Automox Support with device details (name and ID) and relevant logs.