diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 6ce6b5b1e..fb550ee62 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -222,7 +222,9 @@ function Get-NewmanVersion { } function Get-GHVersion { - return "GitHub CLI $(gh --version)" + ($(gh --version) | Select-String -Pattern "gh version") -match "gh version (?\d+\.\d+\.\d+)" | Out-Null + $ghVersion = $Matches.Version + return "GitHub CLI $ghVersion" } function Get-VisualCPPComponents {