Skip to content

Commit 038cb56

Browse files
[Windows] Exclude KB5001148 from windows update (#8456)
1 parent f444d7b commit 038cb56

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

images/win/scripts/Installers/Install-WindowsUpdates.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ function Install-WindowsUpdates {
88
Write-Host "Starting wuauserv"
99
Start-Service -Name wuauserv -PassThru | Out-Host
1010

11+
# Temporarily exclude Windows update KB5001148 since it throws an error.
12+
# 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)
1113
Write-Host "Getting list of available windows updates"
12-
Get-WindowsUpdate -MicrosoftUpdate -OutVariable updates | Out-Host
14+
Get-WindowsUpdate -MicrosoftUpdate -NotKBArticleID "KB5001148" -OutVariable updates | Out-Host
1315

1416
if ( -not $updates ) {
1517
Write-Host "There are no windows updates to install"
1618
return
1719
}
1820

1921
Write-Host "Installing windows updates"
20-
Get-WindowsUpdate -MicrosoftUpdate -AcceptAll -Install -IgnoreUserInput -IgnoreReboot | Out-Host
22+
Get-WindowsUpdate -MicrosoftUpdate -NotKBArticleID "KB5001148" -AcceptAll -Install -IgnoreUserInput -IgnoreReboot | Out-Host
2123

2224
Write-Host "Validating windows updates installation and skip Microsoft Defender Antivirus"
2325
# Azure service can automatic updates AV engine(Microsoft.Azure.Security.AntimalwareSignature.AntimalwareConfiguration)

0 commit comments

Comments
 (0)