From 038cb56f853d3e81ed9d4746d7bb7c5a35ca071b Mon Sep 17 00:00:00 2001 From: Alexey-Ayupov <116575425+Alexey-Ayupov@users.noreply.github.com> Date: Wed, 4 Oct 2023 09:21:16 +0200 Subject: [PATCH] [Windows] Exclude KB5001148 from windows update (#8456) --- images/win/scripts/Installers/Install-WindowsUpdates.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-WindowsUpdates.ps1 b/images/win/scripts/Installers/Install-WindowsUpdates.ps1 index 29960409..c6828719 100644 --- a/images/win/scripts/Installers/Install-WindowsUpdates.ps1 +++ b/images/win/scripts/Installers/Install-WindowsUpdates.ps1 @@ -8,8 +8,10 @@ function Install-WindowsUpdates { Write-Host "Starting wuauserv" Start-Service -Name wuauserv -PassThru | Out-Host + # Temporarily exclude Windows update KB5001148 since it throws an error. + # The KB5001148 itself is quite old and looks like not needed (https://support.microsoft.com/en-us/topic/kb5001148-visual-studio-client-detector-utility-for-administrator-updates-ad593454-547c-43c3-b5a3-6f201ae63f03) Write-Host "Getting list of available windows updates" - Get-WindowsUpdate -MicrosoftUpdate -OutVariable updates | Out-Host + Get-WindowsUpdate -MicrosoftUpdate -NotKBArticleID "KB5001148" -OutVariable updates | Out-Host if ( -not $updates ) { Write-Host "There are no windows updates to install" @@ -17,7 +19,7 @@ function Install-WindowsUpdates { } Write-Host "Installing windows updates" - Get-WindowsUpdate -MicrosoftUpdate -AcceptAll -Install -IgnoreUserInput -IgnoreReboot | Out-Host + Get-WindowsUpdate -MicrosoftUpdate -NotKBArticleID "KB5001148" -AcceptAll -Install -IgnoreUserInput -IgnoreReboot | Out-Host Write-Host "Validating windows updates installation and skip Microsoft Defender Antivirus" # Azure service can automatic updates AV engine(Microsoft.Azure.Security.AntimalwareSignature.AntimalwareConfiguration)