Prevent reboot prompts
This commit is contained in:
parent
9180ca96ef
commit
b7db441579
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ function Invoke-Upgrade([Context] $context)
|
||||||
Restart-Computer;
|
Restart-Computer;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
elseif ((Get-WindowsUpdate).Count -gt 0)
|
elseif ((Get-WindowsUpdate -IgnoreReboot).Count -gt 0)
|
||||||
{
|
{
|
||||||
Write-Information "More updates are available. Restarting upgrade routine.";
|
Write-Information "More updates are available. Restarting upgrade routine.";
|
||||||
$null = Invoke-Upgrade $context;
|
$null = Invoke-Upgrade $context;
|
||||||
|
|
Loading…
Reference in a new issue