2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
|
|
|
|
## File: Install-AzureCli.ps1
|
|
|
|
|
## Desc: Install Azure CLI
|
|
|
|
|
################################################################################
|
|
|
|
|
|
2021-03-26 18:21:42 +03:00
|
|
|
Write-Host "Install the latest Azure CLI release"
|
2021-10-09 16:51:33 +03:00
|
|
|
$azCliUrl = "https://aka.ms/installazurecliwindows"
|
2022-01-20 15:59:37 +03:00
|
|
|
Install-Binary -Url $azCliUrl -Name "azure-cli.msi"
|
2019-12-13 09:48:00 -05:00
|
|
|
|
2021-03-26 18:21:42 +03:00
|
|
|
$azureCliExtensionPath = Join-Path $Env:CommonProgramFiles 'AzureCliExtensionDirectory'
|
|
|
|
|
$null = New-Item -ItemType "Directory" -Path $azureCliExtensionPath
|
2019-12-13 09:48:00 -05:00
|
|
|
|
2021-03-26 18:21:42 +03:00
|
|
|
[Environment]::SetEnvironmentVariable("AZURE_EXTENSION_DIR", $azureCliExtensionPath, [System.EnvironmentVariableTarget]::Machine)
|
2020-07-07 13:20:09 +03:00
|
|
|
|
2020-08-06 11:27:58 +03:00
|
|
|
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Azure CLI"
|