I need to implement disabling/enabling windows update from CMD/PowerShell. for that, I'm using the following commands to disable the WindowsUpdate:
sc config wuauserv start= disabled
sc stop wuauserv
And for enabling I'm using the following commands:
sc config wuauserv start=auto
net start wuauserv
The problem is that after the WindowsUpdate Service restarts the UI is still stuck (also after reboot) and Windows doesn't scan or install the new updates until I manually click the "Retry" button
Is there any CMD/PowerShell that will change the windows update state back to normal? (without clicking on the retry button) a.k.a:
I'm fairly sure that making the Windows Update Agent search for updates should clear that error in the UI. This should do that for you:
That's part of a larger script I use to install updates via Windows Update without having to click through the UI. The entire script is here: