The Azure CLI is the command-line tool for working with Microsoft Azure resources, and grants you access to the CLI through both the Windows Command Prompt (CMD) or PowerShell command-line. You could download and install the Azure CLI using an MSI installer, but if you have the Windows Package Manager installed, there is a quicker, easier way to install the Azure CLI locally using winget
!
Install Azure CLI using winget
Once you have the winget
Windows Package Manager installed, you can use the following command to install the Azure CLI from either the Windows Command Prompt (CMD) or using PowerShell:
winget install AzureCLI
This command gives you a quick and easy way to install the Azure CLI on your local machine using the Windows Package Manager! It really is that simple!

If you are looking to install a specific version of the Azure CLI with winget
, you can also specify the desired version. Here’s another example that demonstrates how to explicitly install version 2.7 of the Azure CLI:
winget install AzureCLI --version 2.7.0
As you can see, to install the desired version of the Azure CLI you simply append the --version
flag to the command with the exact version to install. You can alternatively use the shorter -v
flag as well. If the --version
or -v
flags are not specified, then the winget install
command will install the highest version of the application available within the Windows Package Manager repository service.
Happy Azure CLI scripting!