Skip to content

Instantly share code, notes, and snippets.

@ovitente
Created December 24, 2020 11:09
Show Gist options
  • Save ovitente/caa215a5863209fbb252e75cd99fd7fa to your computer and use it in GitHub Desktop.
Save ovitente/caa215a5863209fbb252e75cd99fd7fa to your computer and use it in GitHub Desktop.
azure cloud resources cleanup
param($Timer)
$toll = Get-AzResourceGRoup | Where-Object ResourceGroupName -like 'sandbox*'
Write-Host "$toll.ResourceGroupName"
foreach ($item in $toll) {
Write-Host "Bye ($item.ResourceGroupName)"
Remove-AzResourceGroup -Name $item.ResourceGroupName -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment