Last active
July 31, 2020 16:16
-
-
Save danuw/5a901f4c8ee89f021dbc02ed48b0ffe2 to your computer and use it in GitHub Desktop.
Azure Cli to list all resource groups across subscriptions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in `az account list -o tsv | awk '{print$3}'`; do echo "switching to subscription $i" ;az account set --subscription $i; az group list -o table; done > output.txt | |
for i in `az account list -o tsv | awk '{print$3}'`; do echo "switching to $i subscription" ;az account set --subscription $i; az resource list -o table; done > output.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment