Installing server updates with WAC

Copper Contributor
Hi guys, can anyone share their experience with server patching? I have 2012R2 to 2019 VMs. If I’m installing updates via WAC there are two options - restart immediately and schedule restart.

If I install any patch and schedule the reboot the sever will always reboot immediately after patch installation. Even with all the patches with Reboot required NO.

So basically I cannot use this approach, because I cannot set the severs to reboot over night if necessary.

Thanks for any input on this.
Martin
5 Replies
I'm having this issue also. After installing update with a scheduled reboot, the server rebooted immediately after the updates were installed, not at the scheduled time. The server was a Hyper-V host so it took down ALL the VMs. The option chosen (reboot at a specific time) was not followed. Also, there should be an option to NEVER reboot after the updates are installed so that a controlled reboot can be performed manually.

Same here, since updating to WAC 1910. If I select schedule restart and set a time, the server always reboots immediately.

 

I've tried different browsers, but the behavior is consistent across browsers and Server OS versions (2012 R2 and 2019). I've also tried leaving the browser open to the update page, with the scheduled restart selected. It certainly behaves as if there's a bug in their code that's ignoring the scheduled restart. 

After a little digging, I think I know where the problem resides, but don't know where else to file a bug report.

 

The PS module named Microsoft.SME.WindowsUpdate defines the function "Install-windowsUpdates" with a parameter for $restartTime. 

 

When using WAC, the javascript takes your $restartTime and generates as script using the Install-WindowsUpdates function, but gives it the restartTime in a format that is invalid for powershell.

 

Example:

This line is from the PS script WAC created on the managed server to trigger the updates....

$restartTime = 'Fri Jan 10 2020 10:00:20 GMT-0500 (Eastern Standard Time)';

The function later uses $restartTime in order to calculate a $waitTime for shutdown.exe,

$waitTime = [decimal]::round(((Get-Date $restartTime) - (Get-Date)).TotalSeconds);

If you simply run

get-date -date 'Fri Jan 10 2020 10:00:20 GMT-0500 (Eastern Standard Time)';

It throws an error, indicating this date string is invalid. 

 

So they need to make sure the restartTime string passed from Javascript to Powershell is in a format powershell can work with. 

There is currently a bug in the WAC until today and the scheduled restart does not work.

Note: The immediate restart works. 

 

for more info, see https://windowsserver.uservoice.com/forums/295071/category/319162

Until this is fixed, here is a tip to have a script perform automatic windows update via the scheduled task https://techdirectarchive.com/2020/03/24/how-to-orchestrate-windows-update-with-powershell-and-task-...

Hi @MHampl ,

 

With WAC version 2017, the issue of scheduled rebooting has been resolved. If you have a different version of WAC running, kindly upgrade this. Here is a link https://techdirectarchive.com/2020/08/13/how-to-upgrade-windows-admin-center/

 

If you require additional information, please let me know.