Reputation: 837
I am creating a StorageAccount & Containers using ARM script
I use New-AzDeployment to create the resources. The resources are created properly. I want to remove the deployment
When I run Remove-AzDeployment -Name ; the deployment is removed, however the resources are not deleted.
How do I ensure that the resources are also deleted. I am using the new Az Module in powershell instead of the old Azure Module
Upvotes: 1
Views: 320
Reputation: 213
The Remove-AzDeployment cmdlet is used to remove a deployment from the deployment history. It won't remove resources deployed in this particular deployment.
You can remove resources from the resource group using Remove-AzResource, like this:
Get-AzResource -ResourceGroupName $ResourceGroupName | Remove-AzResource -Force
Upvotes: 3