This cheatsheet provides key Azure CLI commands to list, view details, and switch between subscriptions and tenants—essential for managing your Azure environment.
az account list --output table
az account show --subscription <subscriptionId>
az account set --subscription "<subscriptionNameOrID>"
az account tenant list --output table
az account tenant show --tenant <tenantId>
az account show
az account list-locations --output table
az consumption usage list --subscription <subscriptionId> --output table
az account update --subscription <subscriptionId> --set tags.Environment=Prod
az account management-group list --output table