Powershell to delete deployments from the Azure Resource Group


param($subName, $resourceGroupName)
Login-AzureRmAccount
Select-AzureRmSubscription -SubscriptionName $subName
$deployments = Get-AzureRmResourceGroupDeployment $resourceGroupName
$deployments | ForEach-Object {
Remove-AzureRmResourceGroupDeployment -Name $_.DeploymentName -ResourceGroupName $resourceGroupName
}


Comments (0)

Skip to main content