diff --git a/images/win/scripts/Installers/Wait-WindowsUpdatesForInstall.ps1 b/images/win/scripts/Installers/Wait-WindowsUpdatesForInstall.ps1 index 2039e9396..912f884c9 100644 --- a/images/win/scripts/Installers/Wait-WindowsUpdatesForInstall.ps1 +++ b/images/win/scripts/Installers/Wait-WindowsUpdatesForInstall.ps1 @@ -4,7 +4,7 @@ ################################################################################ Invoke-SBWithRetry -RetryCount 10 -RetryIntervalSeconds 120 -Command { - $inProgress = Get-WindowsUpdatesHistory | Where-Object Status -eq "InProgress" + $inProgress = Get-WindowsUpdatesHistory | Where-Object Status -eq "InProgress" | Where-Object Title -notmatch "Microsoft Defender Antivirus" if ( $inProgress ) { $title = $inProgress.Title -join "`n" throw "InProgress: $title" diff --git a/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 b/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 index 973105396..14b708f96 100644 --- a/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 +++ b/images/win/scripts/Tests/WindowsFeatures.Tests.ps1 @@ -72,7 +72,7 @@ Describe "Windows Updates" { It "" -TestCases $testCases { $expect = "Successful" if ( $Title -match "Microsoft Defender Antivirus" ) { - $expect = "Successful", "Failure" + $expect = "Successful", "Failure", "InProgress" } $Status | Should -BeIn $expect