Created
January 26, 2018 12:36
-
-
Save goyalmohit/00aa25303e32ab424a6cf18bcaa24abd to your computer and use it in GitHub Desktop.
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
# 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