Skip to content

Instantly share code, notes, and snippets.

@nikneem
Last active October 28, 2021 09:39
Show Gist options
  • Save nikneem/6917b5dff811164c2fe2758e267f59b8 to your computer and use it in GitHub Desktop.
Save nikneem/6917b5dff811164c2fe2758e267f59b8 to your computer and use it in GitHub Desktop.

Azure commands

This gist contains commands or actions that make some operations extremely handy in Azure.

Batch delete resource groups

Go to the Resource Groups view and check all resource groups you want to delete. Click on the Assign Tags button and assign a tag called 'delete' without any value. Now go to the cloud shell withing the azure portal and execute the following command to delete all tagged resource groups:

az group list --tag delete --query [].name -o tsv | xargs -otl az group delete --no-wait -y -n

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment