Prevent reboot prompts

This commit is contained in:
Manuel Thalmann 2023-06-22 17:33:14 +02:00
parent 9180ca96ef
commit b7db441579

View file

@ -15,7 +15,7 @@ function Invoke-Upgrade([Context] $context)
Restart-Computer;
exit;
}
elseif ((Get-WindowsUpdate).Count -gt 0)
elseif ((Get-WindowsUpdate -IgnoreReboot).Count -gt 0)
{
Write-Information "More updates are available. Restarting upgrade routine.";
$null = Invoke-Upgrade $context;