Older days we used to manage azure resources through AzureRM PowerShell modules . This was very much flexible for any Azure Administrator or Developers to run Automated Deployments to Azure Resource Manager resources.
Azure CLI is the next improved version with simplified cmdlets to make life easier and it is cross-platform.
You can use Azure CLI in two ways:
- Azure Portal – Through Azure Cloud Shell
- PowerShell module
- Download Azure CLI designed for Linux/Windows/MacOS based on your OS.
- Install and follow the steps.
- Verify the Installation by executing cmdlet [ az –version ]
Running the Azure CLI from PowerShell has some advantages over running the Azure CLI from the Windows command prompt, provides additional tab completion features.
Now let us try logging in to Azure using Azure CLI. There are various ways of logging in, for this article I would try simple web login using az login command.
Execute the following cmdlet to login to Azure:
The Azure CLI will launch your default browser to open the Azure sign-in page. After a successful sign in, you’ll be connected to your Azure subscription. If it fails, follow the command-line instructions and enter an authorization code at https://aka.ms/devicelogin.
Create a azure resource group and verify:
Hope that is helpful for you to get started with Azure CLI. To learn more about Azure CLI cmdlets : https://github.com/Azure/azure-cli