Most folks aren’t aware of how powerful the Azure platform really is. As I’ve been presenting topics on Azure, I’ve had many people say, “How did you do that?” So I’ll be documenting my tips and tricks for Azure in these posts.
The Complete List
Configure the Azure CLI to set Defaults and More
In my last tip, I covered using the
--output Table parameter to customize the results from the Azure CLI. You can also set it as a default amongst other thing. Simply run
az configure and you’ll see the following :
Your settings can be found at /home/mbcrump/.azure/config Your current configuration is as follows: [cloud] name = AzureCloud [core] first_run = yes output = table collect_telemetry = yes [logging] enable_log_file = no Do you wish to change your settings? (y/N):
If you press Y, then you’ll get an option to change the default output as shown below:
What default output format would you like?  json - JSON formatted output that most closely matches API responses  jsonc - Colored JSON formatted output that most closely matches API responses  table - Human-readable output format  tsv - Tab and Newline delimited, great for GREP, AWK, etc.
If you make a selection, then you’ll see an option to add file logging:
Would you like to enable logging to file?
And finally an option to opt into data collection:
Microsoft would like to collect anonymous Azure CLI usage data to improve our CLI. Participation is voluntary and when you choose to participate, your device automatically sends information to Microsoft about how you use Azure CLI. To update your choice, run "az configure" again. Select y to enable data collection. (Y/n):
Here is a sample of setting the configuration and running a command:
Want more Azure Tips and Tricks?
If you’d like to learn more Azure Tips and Tricks, then follow me on twitter or stay tuned to this blog! I’d also love to hear your tips and tricks for working in Azure, just leave a comment below.