My Azure subscription is out of control with resource groups, many of which I have no idea what they are even for?!
What to do?!
I just repaved my laptop, why not repave my Azure subscription?!
I fired up my terminal and create a script to get the job done.
1 2 3 4 5 6 7 |
$resources = az group list | ConvertFrom-Json foreach ($resource in $resources) { Write-Host $resource.name az group delete -n $resource.name --no-wait -y } |
Ran the script, and bingo, all my resource groups gone!
Use at your own risk!
Discover more from Matt Ruma
Subscribe to get the latest posts sent to your email.
do you know how to list out
list of resigned users with active accounts
list of multifactor disabled AD accounts