Improve this page

PS

```powershell #Get list of all Resource Group $rgName = @(Get-AzureRmResourceGroup | Select-Object ResourceGroupName)

#Creating blank array for storing Deleted Resource Group names $DeletedRg = @()

foreach ($rg in $rgName) {

#Checking if name contains the words test, poc or demo
if ($rg -like "*test*" -or $rg -like "*poc*" -or $rg -like "*demo*")
{
    #If the words are present, delete the Resource Groups
    #$rg
    $DeletedRg = $DeletedRg + $rg
    Remove-AzureRmResourceGroup -Name $rg.ResourceGroupName -Force
} }

If ($DeletedRg.Count -eq 0) { Write-Host “nNo Resource Groups to delete!n” } else { Write-Host “nnThe following”$DeletedRg.Count”Resource Group(s) were deleted:” $DeletedRg }