diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 79b306cb..e4d65b09 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -196,13 +196,13 @@ function Get-JqVersion { } function Get-AzureCliVersion { - $azcliVersion = az -v | Select-String "azure-cli" | Take-OutputPart -Part -1 + $azcliVersion = (az version | ConvertFrom-Json).'azure-cli' $aptSourceRepo = Get-AptSourceRepository -PackageName "azure-cli" return "Azure CLI (azure-cli) $azcliVersion (installation method: $aptSourceRepo)" } function Get-AzureDevopsVersion { - $azdevopsVersion = az -v | Select-String "azure-devops" | Take-OutputPart -Part -1 + $azdevopsVersion = (az version | ConvertFrom-Json).extensions.'azure-devops' return "Azure CLI (azure-devops) $azdevopsVersion" }