What is Azure CLI?
Microsoft Azure Command-Line Interface (Azure CLI) uses a set of open-source shell-based commands (Bash, Terminal, Command prompt, and so on) for creating and handling resources in Microsoft Azure. Once the Azure CLI has been installed then you will be able to connect it with your Azure subscription and run the Azure commands.
How to install Azure CLI in Windows
The following installer packages are available:
Firstly, we go to above web link and download Azure CLI Setup File by using Web Platform Installer. Then click Install Button.
Now you will get Terms and Condition Page, then click I Accept Button,
After Clicing Accept Button, it will take few minutes for downloaing and installing Azure CLI Software. Once Installed we are ready to use Azure Command in Command Prompt.
Connect to an Azure subscription from the Azure Command-Line Interface (Azure CLI)
To connect to an Azure subscription from Azure, Open Command prompt and type the following command,
Azure login
After executing above command, we get the following information from Command prompt.
Next Copy Web Address and Code then open browser paste link and enter the code and click continue button.
And then enter the username and password for the identity you want to use. When that process completes you will get the following information.
Now you are connected and ready to use Azure portal through Azure CLI.
Run Azure CLI commands
For example, to see the version of the Azure CLI you installed, type the following,
azure version