Tuesday, February 4, 2020

Azure CLI helpful tips

1. use -h in the az group to show all available options for the command.

C:\Users>az group -h

Group
    az group : Manage resource groups and template deployments.

Subgroups:
    deployment : Manage Azure Resource Manager deployments.
    lock       : Manage Azure resource group locks.

Commands:
    create     : Create a new resource group.
    delete     : Delete a resource group.
    exists     : Check if a resource group exists.
    export     : Captures a resource group as a template.
    list       : List resource groups.
    show       : Gets a resource group.
    update     : Update a resource group.
    wait       : Place the CLI in a waiting state until a condition of the resource group is met.


2. use az interactive to work in the interactive mode.

it is very cool feature to use. even though it is in preview mode. it supports the intelli-sense, it shows the autocomplete during your typing








3. use --output flag to format the output display
when you try to list all account using az account list, the output will be in json format

we can use tsv to show the result in table format.

az account list --output tsv

No comments:

Post a Comment