Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @"
- {
- "`$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
- "contentVersion": "1.0.0.0",
- "parameters": {},
- "variables": {},
- "resources": [],
- "outputs": {}
- }
- "@ > $env:TEMP\ResourceGroupCleanup.template.json
- foreach ($item in (Get-AzureRmResourceGroup))
- {
- $name = $item.ResourceGroupName
- New-AzureRmResourceGroupDeployment -ResourceGroupName $name -Mode Complete -TemplateFile $env:TEMP\ResourceGroupCleanup.template.json -Force -Verbose
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement