Update
As of Azure CLI version 2.0.55 that was released on 01/15/2019, the --output
param now supports none
. So you can just use: az [command] --output none
to suppress CLI output.
You can review the PR that implemented the none
option here: https://github.com/Azure/azure-cli/pull/8198/files
Original Post
By default, when you run an Azure CLI command, az [command]
, it will usually have an output…but sometimes you want to suppress the output.
There’s no way to tell the Azure CLI to suppress output - the --output
param supports json,jsonc,table,tsv,yaml.
If you don’t want it to print any output, then you can use the following command…
** NEW **
az [command] --output none
** OLD **
az [command] --query "[?n]|[0]"
I’ve asked the CLI team to provide a -o none
option and that request is being tracked here: https://github.com/Azure/azure-cli/issues/5667
Jon