[Bug][Updates]
WAC 1910, build 1.2.1910.31005
Server Management
module/tab: Updates
Function: Install-WindowsUpdates
Issue: Schedule restart takes no effect.
Schedule restart setting is not effect, target server reboots immediately after windows update installed while schedule restart time was defined in web UI
event found on WAC:
{"powerShell":"Install-WindowsUpdates","module":"msft.sme.shell"}
event on target server:
{"powerShell":"Install-WindowsUpdates","module":"msft.sme.shell","userOnGateway":"###########","gateway":"##########","delegation":"True","userOnTarget":"########"}
WAC installed as gateway on Windows Server 2016 (OS Build 14393.3300) - connected to domain
target server is Windows Server 2012R2

3 comments
-
SRicher commented
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. The WAC version used was the GA 1910.
-
Anonymous commented
can confirm the issue
-
Will Yin commented
I found this issue is caused by incorrect time string in Install-WindowsUpdates.ps1 script.
Example:
in RootDrive:\User\LoggedInUser\AppData\Local\Install-WindowsUpdates.ps1Line 4:
$restartTime = 'Tue Nov 19 2019 10:53:08 GMT+0800 (Hong Kong Standard Time)';Line 99:
$waitTime = [decimal]::round(((Get-Date $restartTime) - (Get-Date)).TotalSeconds);Get-Date can't recognized $restartTime as a valid DateTime."