Fix windows update automation

This commit is contained in:
Manuel Thalmann 2023-06-22 17:32:05 +02:00
parent 7593259f33
commit c78524ef69

View file

@ -7,7 +7,7 @@ function Invoke-Upgrade([Context] $context)
Write-Information "Performing Windows Update";
$null = Install-WindowsUpdate -AcceptAll -IgnoreReboot;
if ((Get-WURebootStatus).RebootRequired)
if ((Get-WURebootStatus -Silent))
{
Write-Debug "A Reboot is Required!";
Write-Debug "Windows will reboot now and the installation will be continued automatically.";