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

Discussion in 'Operating Systems' started by burritoincognito, Jun 20, 2018.

  1. burritoincognito

    burritoincognito Gawd

    Messages:
    761
    Joined:
    Sep 17, 2012
    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)
     
  2. AltTabbins

    AltTabbins [H]ard as it Gets

    Messages:
    18,837
    Joined:
    Jul 29, 2005
    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.