I'm working on automating Windows Update management using a PowerShell script. The script resumes updates by modifying the registry and restarting the relevant services (wuauserv and UsoSvc), and it also installs critical updates.
However, despite successfully resuming updates in the registry and confirming the services have restarted, the Windows Update UI still shows "Updates paused" with a button to "Resume updates" (as seen in the screenshot). The system is set to resume updates on a specific date, but the script should have updated this state to reflect that updates are already resumed.
Steps I took:
Set PauseUpdates and PauseEndTime to 0 in the registry under HKLM:\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\Settings.
Restarted wuauserv and UsoSvc services.
Triggered the Windows Update Agent to detect updates using (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow().
Cleared the SoftwareDistribution cache to force a UI refresh.
Installed critical updates via PowerShell.
Issue:
After running the script, the updates resume properly according to the registry and services, but the Windows Update UI still incorrectly shows the updates as paused.
I expected the Windows Update UI to update automatically and reflect the fact that updates have been resumed (i.e., showing the "Check for updates" button instead of the "Resume updates" button). The registry and services seem to indicate that updates are no longer paused, but this change isn't reflected in the UI.