From 46b504e2abe1735592561ceec27f7d7ac515b9b9 Mon Sep 17 00:00:00 2001 From: Henning Date: Fri, 5 Sep 2025 14:37:18 +0200 Subject: [PATCH] Update AppCmdOnTargetMachines.ps1 Adjusted the regex pattern to also recognize the German output of netsh (Zertifikathash) in addition to the English Certificate Hash. This ensures the SSL certificate binding check works correctly on German Windows servers. Linked to issue #1278. (https://github.com/microsoft/azure-pipelines-extensions/issues/1278) --- .../TaskModuleIISManageUtility/AppCmdOnTargetMachines.ps1 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/TaskModules/powershell/TaskModuleIISManageUtility/AppCmdOnTargetMachines.ps1 b/TaskModules/powershell/TaskModuleIISManageUtility/AppCmdOnTargetMachines.ps1 index d986f155e..d04723ef1 100644 --- a/TaskModules/powershell/TaskModuleIISManageUtility/AppCmdOnTargetMachines.ps1 +++ b/TaskModules/powershell/TaskModuleIISManageUtility/AppCmdOnTargetMachines.ps1 @@ -184,8 +184,8 @@ function Add-SslCert $result = Invoke-VstsTool -Filename "netsh" -Arguments $showCertCmd $bindingPattern = "Hostname:port\s*:\s*([^:\s]+):(\d+)" - $certHashPattern = "Certificate Hash\s*:\s*([a-fA-F0-9]+)" - + $certHashPattern = "(Certificate Hash|Zertifikathash)\s*:\s*([a-fA-F0-9]+)" + $resultText = $result -join "`n" if($resultText -match $bindingPattern) @@ -896,4 +896,5 @@ function Invoke-Main Invoke-AdditionalCommand -additionalCommands $AppCmdCommands Write-Verbose "Exiting Execute-Main function" -} \ No newline at end of file + +}