Adventure with Azure: Cleaning House

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 $

    az group delete -n $ --no-wait -y

Ran the script, and bingo, all my resource groups gone!

Use at your own risk!