diff --git a/eng/common/scripts/Verify-AgentOS.ps1 b/eng/common/scripts/Verify-AgentOS.ps1 index 2a7edc4d05bb..3839553a0ff7 100644 --- a/eng/common/scripts/Verify-AgentOS.ps1 +++ b/eng/common/scripts/Verify-AgentOS.ps1 @@ -8,7 +8,7 @@ function Throw-InvalidOperatingSystem { throw "Invalid operating system detected. Operating system was: $([System.Runtime.InteropServices.RuntimeInformation]::OSDescription), expected image was: $AgentImage" } -if ($IsWindows -and $AgentImage -match "windows|win|MMS2019") { +if ($IsWindows -and $AgentImage -match "windows|win|MMS\d{4}") { $osName = "Windows" } elseif ($IsLinux -and $AgentImage -match "ubuntu") { $osName = "Linux"