0
0
Azurecloud~10 mins

Output formats (json, table, tsv) in Azure - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the Azure CLI output format to JSON.

Azure
az configure --defaults output=[1]
Drag options to blanks, or click blank then click option'
Ayaml
Bjson
Ctsv
Dtable
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'table' or 'tsv' instead of 'json' will change the output format.
2fill in blank
medium

Complete the command to list Azure VMs with output in table format.

Azure
az vm list --output [1]
Drag options to blanks, or click blank then click option'
Atable
Bjson
Ctsv
Dnone
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'json' or 'tsv' will not display a table.
3fill in blank
hard

Fix the error in this command to output VM names only in TSV format.

Azure
az vm list --query "[].[1]" --output tsv
Drag options to blanks, or click blank then click option'
Aname
Bid
Clocation
Dtype
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'id' or 'location' will return unwanted data.
4fill in blank
hard

Fill both blanks to output VM names and their locations in JSON format.

Azure
az vm list --query "[].{VMName: [1], Location: [2]" --output json
Drag options to blanks, or click blank then click option'
Aname
Blocation
Cid
Dtype
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping 'name' and 'location' or using 'id' causes wrong output.
5fill in blank
hard

Fill all three blanks to output VM names, resource groups, and OS types in table format.

Azure
az vm list --query "[].{Name: [1], ResourceGroup: [2], OS: storageProfile.[3].osType}" --output table
Drag options to blanks, or click blank then click option'
Aname
BresourceGroup
CosDisk
Dlocation
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'location' instead of 'resourceGroup' or wrong OS path causes errors.