Written by 7:31 am Microsoft, Microsoft Azure

How to Configure Azure CLI Default Output Format

How to Configure Azure CLI Default Output

The Azure command-line interface (Azure CLI) is a set of commands used to create and manage Azure resources. In this blog post, I am going to show you how you can configure the Azure CLI default output format.

If you have used the Azure resources on your machine or in Azure Cloud Shell, you are aware that if you are running a command, the output you get is in the JSON format. This is great if you are building some sort of automation. However, if you are using in in the command line, it might not be the best way to read the output. You can change the output by using --output table or -o table to make it more human-readable.

To install the Azure CLI check out my blog post here.

How to Configure Azure CLI Default Output

You can also configure the Azure CLI default output to always be a specific type like the table format by running the az configure command. The Azure CLI allows for user configuration for settings such as logging, data collection, output format, and default argument values. You can learn more about the Azure CLI configuration on Microsoft Docs.

Azure CLI az configure

Azure CLI az configure

With az configure, you can manage Azure CLI configuration with this command is interactive.

Azure CLI az configure default output

Azure CLI az configure default output

Here you can now change the default output format.

Azure CLI Tip – Use AI to find az commands
If you did use the Azure CLI, you might find this tip very handy. I am talking about the az find command. The az find command provides you with example commands based on Azure documentation and usage patterns of the Azure CLI and Azure Resource Manager users.

Conclusion

I hope this blog post shows you how to configure the Azure CLI default output format. Are you just getting started with the Azure CLI and want some introduction, check out the get started with Azure CLI Microsoft Docs page. If you have any questions let me know in the comments.

Tags: , , , , , , , , , , , , , Last modified: June 15, 2020
Close Search Window
Close