diff --git a/images/linux/scripts/installers/azpowershell.sh b/images/linux/scripts/installers/azpowershell.sh index 13253b5fa..f18492c5e 100644 --- a/images/linux/scripts/installers/azpowershell.sh +++ b/images/linux/scripts/installers/azpowershell.sh @@ -18,6 +18,10 @@ pwsh -Command "Update-Module -Name PowerShellGet -Force" # Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) for version in ${versions[@]}; do pwsh -Command "Save-Module -Name Az -LiteralPath /usr/share/az_$version -RequiredVersion $version -Force -Verbose" + if isUbuntu20; then + rm -rf "/usr/share/az_$version/Az.Accounts" + pwsh -Command "Save-Module -Name Az.Accounts -LiteralPath /usr/share/az_$version -RequiredVersion 1.9.5 -Force -Verbose" + fi done # Run tests to determine that the software installed as expected