The command in question is an undocumented program inside Windows 10 named C:\Windows\System32\USOClient.exe This program manages Windows Updates much like the old wuauclt used to:
- Launch a CMD prompt or PowerShell AS AN ADMINISTRATOR
- Type USOClient.exe ScanInstallWait
- You would expect that command to download and install the updates but it does not appear to, so you have use the next command
- Then USOClient.exe StartInstall
- The installs will likely take a few minutes to complete so if you are scripting this you are going to want to put a delay timer in (see below)
- Then download and unzip the free SHUTDOWNWITHUPDATES directly from the developer, Dennis Babkin, HERE.
- Then run SHUTDOWNWITHUPDATES /r /f
- those switches force a reboot and complete the patches installs
Sooooo, below and HERE are the easy script to do this. Alternately, if you have PDQ Deploy, you can download our PDQ DEPLOY script directly from us HERE. If do you use this simple PDQ Deploy script you will need to download the SHUTDOWNWITHUPDATES exe and set the path to it in this PDQ Deploy script.
REM Download and Fully Install Windows Updates
REM by www.URTech.ca Ian Matthews
REM Last Updated Nov 19 2018
REM These two commands do not need a path
REM Wait 40 mins to allow all the installs to complete
timeout /T 2400
REM download from https://dennisbabkin.com/utilities/#ShutdownWithUpdates
REM this command will need a local path to the file unless it is run from the same folder that contains it
ShutdownWithUpdates.exe /r /f
For more information on USOClient read our USOCLIENT DOCUMENTATION page.