Install Azure CLI via PowerShell

Install Azure CLI via PowerShell


You can also install the Azure CLI using PowerShell. Start PowerShell as administrator and run the following command:

Invoke-WebRequest -Uri https://aka.ms/installazurecliwindows -OutFile .\AzureCLI.msi; Start-Process msiexec.exe -Wait -ArgumentList '/I AzureCLI.msi /quiet'; rm .\AzureCLI.msi


This will download and install the latest version of the Azure CLI for Windows. If you already have a version installed, the installer will update the existing version. After the installation is complete, you will need to reopen PowerShell to use the Azure CLI.


Run the Azure CLI


You can now run the Azure CLI with the az command from either Windows Command Prompt or PowerShell. 

az login

  1. If the CLI can open your default browser, it will do so and load an Azure sign-in page.
    Otherwise, open a browser page at https://aka.ms/devicelogin and enter the authorization code displayed in your terminal.
  2. Sign in with your account credentials in the browser.