title: Azure Powershell: Delete files in multiple containers
body: <p>I been running this script for each container removing my SQL backups that are older than 35 days. Can anyone assist me on writing a loop (foreach) to go through each container removing files older than 35 days?</p>
  
  <p>Here is my script for one container but I will need to run this for each container.</p>
  
  <pre><code>$SubScriptionName = "subname"
  $StorageAccountName = "storagename"
  Select-AzureSubscription –SubscriptionName $SubScriptionName
  Set-AzureSubscription –SubscriptionName $SubScriptionName –CurrentStorageAccount $StorageAccountName
  
  $Container = "nameOfContainer"
  $CleanupOlderThan35Days = [DateTime]::UtcNow.AddDays(-35)
  
  Get-AzureStorageBlob -Container  $Container | Where-Object { $_.LastModified.UtcDateTime -lt $CleanupOlderThan35Days } |Remove-AzureStorageBlob
  </code></pre>