Created
January 3, 2018 17:03
-
-
Save deldersveld/5a97c797bd499b3516045928b0a53402 to your computer and use it in GitHub Desktop.
Remove all blob containers and child blobs based on the specified container name prefix
This file contains hidden or 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
Login-AzureRmAccount | |
$containerPrefix = <<string containing prefix to search. wildcard character not needed after prefix.>> | |
$storageContext = New-AzureStorageContext -ConnectionString <<connection string to storage account>> | |
Get-AzureStorageContainer -context $storageContext -prefix $containerPrefix | ForEach-Object {Remove-AzureStorageContainer -context $storageContext -Container $_.Name -Force} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment