Life's random bits By b1thunt3r (aka Ishan Jain)…
Getting Started: Azure CLI

Getting Started: Azure CLI

Ishan jain
There are several ways to manage Azure. You can use either Azure Portal, Azure PowerShell Commandlets, Azure CLI or Azure API. One of the more common one today (besides) Portal is Azure CLI.

Disclaimer: Currently I am employed by Microsoft, but my views and thoughts are still my own. The reason I joined Microsoft was, the work Microsoft have been doing for last couple of years in Open Source Space. Today I am a advocate for Open Source representing Microsoft.

Install Azure CLI

Azure CLI is available for Windows, Linux and macOS. You can get the guides for your OS of choice at Microsoft Docs.

Login to Azure

First of all we need to make sure we are logged in to Azure.

az login

Optional: Change Subscription

If you have multiple Azure Subscriptions, you might want to whitch to the right one.

You can list all the subscriptions you have access to with:

az account list --output table

You can select a subscription with:

az account set --subscription "{SUBSCRIPTION-NAME}"

Create a Resource Group

Azure organizes all the resources in Resource Groups.

You can create a new Resource Group with:

az group create --name "{GROUP-NAME}" --location "{AZURE-REGION}"

You can list all the Azure regions with:

az account list-locations --output table