Created
June 18, 2018 15:59
-
-
Save rsponholtz/ca9c325c68202714f6273e325d43ead8 to your computer and use it in GitHub Desktop.
delete unused disks in azure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$subscriptionname = "mysubscription" | |
$resourcegroup = "myresourcegroup" | |
select-azurermsubscription -subscriptionname $subscriptionname | |
Get-AzureRmDisk -ResourceGroupName $resourcegroup | Where-Object {$_.ManagedBy -eq $Null} | remove-azurermdisk -force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment