Azure CLI 2 · Output and queries
Capture a value in a script
Use tsv output for a plain value without quotes.
ID=$(az vm show -g my-rg -n my-vm --query id --output tsv)
Official Azure CLI 2 documentation
Azure CLI 2 · Output and queries
Use tsv output for a plain value without quotes.
ID=$(az vm show -g my-rg -n my-vm --query id --output tsv)
Official Azure CLI 2 documentation
Was this page helpful?