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.
$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!