In this blog post about Microsoft Azure, I will show you how to Install and use the Azure CLI 2.0 command line tool to manage resources on Microsoft Azure.
How to Use Azure CLI 2.0
Is a new command line experience that works on Windows, MacOS and Linux and allows management of Azure resources like Virtual Machines, Containers, Storage and Networks.
Azure CLI is also available via the Azure Portal as Cloud Shell. However, the browser experience is slower.
Install Azure CLI on Windows
Below, I will install it on Windows 10; however, once installed, all commands are the same on any OS.
To get started, I’ll download the latest CLI version from the link below
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-windows?view=azure-cli-latest
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu1.png)
Follow the prompt until completed
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu2.png)
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu3.png)
Manage Resources
To get started and login to Azure I will use the line below which uses two-factor authentication, first you open the browser with the link below and type the code.
If the code is correct, you will be asked to provide your username and password to login to Azure.
Az login
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu4.png)
To view the installed Azure CLI version, I type the line below.
az --version
View all commands by typing
az help
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu5.png)
To get help on a specific command set, I will run the line below, and it will show me all the container commands
az aks -h
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu6.png)
Azure CLI Interactive Mode
One of the great things about Azure CLI 2.0 is the interactive mode, which completes commands and shows helpful information on the same screen.
To enter interactive mode, I type the line below.
az interactive
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu7.png)
As you can see, the CLI shows both command and help information below
If I type help, It displays all available commands.
![](https://ntweekly-3e2e1f4957bdf35452c0-endpoint.azureedge.net/blobntweekly18036ad1fb/wp-content/uploads/2018/05/050618_0334_HowtoUseAzu9.png)
2 thoughts on “How to Use Azure CLI 2.0”
Comments are closed.