Menu

Newsletter

Deleting all Resource Groups from Azure

Shinish 6 years ago 48
0 0
Read Time:22 Second

While working on the test Environment, I prefer to delete all the Resource Group and also all resources contained within, once the Mission is Accomplished.

I recommend to use only for the Lab environment. Use this PowerShell one liner script cautiously.

Warning: DO NOT use it in Production Environment

#CAUTION: This script will Delete all the Resource Groups
Get-AzureRmResourceGroup | %{ Write-output "Removing Resource Group ... ";$_.ResourceGroupName; $DeleteVar = Remove-AzureRmResourceGroup $_.ResourceGroupName -Confirm:$false -Force:$true}
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Written By

Average Rating

5 Star
0%
4 Star
0%
3 Star
0%
2 Star
0%
1 Star
0%