Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Script to delete all the content in a blob storage container
$Context = New-AzureStorageContext -StorageAccountName $(BlobServiceName) -StorageAccountKey $(WolfTrackerBlobKey)
$blobs = Get-AzureStorageBlob -Context $Context -Container $(WolfTrackerBlobContainer)
foreach ($blob in $blobs)
Write-Host ("Removing Blob: {0}" -f $blob.Name)
Remove-AzureStorageBlob -ICloudBlob $blob.ICloudBlob -Context $Context
Write-Host "DONE - deleted all the files in the container $ContainerName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.