mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
15 lines
765 B
PowerShell
15 lines
765 B
PowerShell
################################################################################
|
|
## File: Install-AzureCli.ps1
|
|
## Desc: Install Azure CLI
|
|
################################################################################
|
|
|
|
Write-Host "Install the latest Azure CLI release"
|
|
$azCliUrl = "https://aka.ms/installazurecliwindows"
|
|
Install-Binary -Url $azCliUrl -Name "azure-cli.msi" -ArgumentList ("/qn", "/norestart")
|
|
|
|
$azureCliExtensionPath = Join-Path $Env:CommonProgramFiles 'AzureCliExtensionDirectory'
|
|
$null = New-Item -ItemType "Directory" -Path $azureCliExtensionPath
|
|
|
|
[Environment]::SetEnvironmentVariable("AZURE_EXTENSION_DIR", $azureCliExtensionPath, [System.EnvironmentVariableTarget]::Machine)
|
|
|
|
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "Azure CLI" |