For system, network and cloud administrators

How to list all Azure resource groups that start with a pattern using Azure CLI

In order to list all resource groups that start with rg, for example, type:

az group list --query "[?starts_with(name,'rg')].name" --output tsv

How to create a new Azure resource group using Azure CLI

It’s really practical to know how to create resources using multiple methods. In order to create a new resource group type:

az group create --name yourresourcegroup --location yourdesiredlocation

How to retrieve properties of a newly created Azure resource group using Azure CLI

In order to display the properties of a specific resource group in Azure type:

az group show --name yourresourcegroup --output tsv