Ignore exceptions during updates

This commit is contained in:
Manuel Thalmann 2023-07-18 21:57:08 +02:00
parent ea8007e2ae
commit 042fab81c5

View file

@ -9,7 +9,11 @@ function Update-WindowsInstallation([Context] $context)
$null = Import-Module PSWindowsUpdate;
Write-Host "Performing Windows Update";
try {
$null = Install-WindowsUpdate -AcceptAll -IgnoreReboot -ErrorAction "SilentlyContinue";
}
catch { }
if ((Get-WURebootStatus -Silent))
{