Fix windows update automation

This commit is contained in:
Manuel Thalmann 2023-06-22 17:32:05 +02:00
parent 22c55f2729
commit b4d6b651b6

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.";