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

Leave a Reply

Your email address will not be published. Required fields are marked *