diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index af06164c..d14a9adc 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -87,8 +87,7 @@ function Get-JQVersion { } function Get-KubectlVersion { - $(kubectl version --client=true --short=true) -match "Client Version: v(?.+)" | Out-Null - $kubectlVersion = $Matches.Version + $kubectlVersion = (kubectl version --client --output=json | ConvertFrom-Json).clientVersion.gitVersion.Replace('v','') return "Kubectl $kubectlVersion" }