Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Deletes files from Azure Blob Storage
$blobList = Get-AzureStorageBlob -Container $containerName -Context $strContext | Where-Object {$_.LastModified -le ($(Get-Date).AddMinutes(-1))}
foreach($blob in $blobList){
Write-Host "Removing blob $($blob.Name)"
Remove-AzureStorageBlob -Blob $($blob.Name) -Container $containerName -Context $strContext
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment