Command line to force Windows update, and restart + update when done?

Joined
Sep 17, 2012
Messages
767
I've got a few hundred computers that still haven't updated to 1803, and I'm going to be in this weekend for regular scheduled maintenance on the servers.

I'd like to be able to push something via command line to tell all computers to run all Windows Updates I've put out via my WSUS, and reboot when completed, and perform the upgrade from 1709 to 1803 if available.

Typically, shutdown -r -t 0 -f will restart it, but doesn't seem to always get the upgrade part done.

wuauclt.exe /updatenow may be updating, but since there's an indeterminate amount of time before it finishes downloading and installing to where it's ready to reboot, I don't know that I can just successfully pipe it with the reboot command.

Before I start experimenting with that, anyone have any suggestions?


(Deployment of this command will be via PDQ Deploy, because it actually works...I just haven't found the right stuff to put in to tell it what command to make all the computers run)
 
I think PDQ deploy has a package for 1803. You can just set last step as reboot when you deploy it.

Edit: Just checked, they don't. They have the 1803 post update rollup.
 
Back
Top