Had to update some of my Windows Server Core servers. Just writing these as a note to my future self.
The Windows Update command is wuauclt
. I can never get that command name (except that it starts with “wu”, short for “Windows Update”) so I always go into c:\windows\system32 and type “wu” followed by a couple of TAB
s).
The command doesn’t have any output or help switches. Here’s a post with a list of switches. In my experience none of the switches return any output, even if you enter the wrong switch. Some of the legit switches like /showWindowsUpdate
and /showWUAutoScan
return an error on Server Core – possibly because the UI doesn’t exist.
To check for new updates the following switch works: /detectNow
.
To update the WSUS server with the client’s status the following switch supposedly works: /r /ReportNow
.
Windows Update has a log file located at c:\Windows\WindowsUpdate.log
. It’s a useful file. For instance, after I applied a policy to change all my domain servers to point to the new WSUS server I could browse this log file to see the results. I could also see on my Server Core installs an error along these lines: “Can not perform non-interactive scan if AU is interactive-only”. This error is because I had set the Windows Update GPOs to be interactive but Server Core didn’t have a GUI for interactive operations.
For Server Core the easiest way to check for updates is via SConfig. Open it and select option 6 (Download and Install Updates). This just runs another script – located in c:\Windows\System32\en-US
– called WUA_SearchDownloadInstall.vbs
. So one could really run a command like this on Server Core:
1 |
cscript.exe c:\Windows\System32\en-US\WUA_SearchDownloadInstall.vbs |
That’s all for now!