321 words
2 min
How To Download All Containers And Blobs In Azure With Powershell

PowerShell to the rescue once again! A week back I needed to create an archive of all of the video content processed by Azure Media Services (AMS). While I have used my trusty Azure Storage Explorer tool in the past, it only allowed me to deal with one container at a time. AMS is structured so that each new job that was created stored it’s files in a new container, which made manually grabbing 250+ containers named with GUIDs rather difficult.

Azure Wallpaper

Fortunately, with a little digging online, I was able to build a quick PowerShell script that allowed me to traverse all containers for a given storage account and then traverse all the blobs within the container and download them all. All in all I had about 38GB of data to pull down in about 2 hours. I’ve saved the script as a Github Gist for you to use if you need it, and for me to dogfood again later. Enjoy!

https://gist.github.com/c68d8ea53eaf86f588d4716077448a64

PowerShell to the rescue once again! A week back I needed to create an archive of all of the video content processed by Azure Media Services (AMS). While I have used my trusty Azure Storage Explorer tool in the past, it only allowed me to deal with one container at a time. AMS is structured so that each new job that was created stored it’s files in a new container, which made manually grabbing 250+ containers named with GUIDs rather difficult.

Azure Wallpaper

Fortunately, with a little digging online, I was able to build a quick PowerShell script that allowed me to traverse all containers for a given storage account and then traverse all the blobs within the container and download them all. All in all I had about 38GB of data to pull down in about 2 hours. I’ve saved the script as a Github Gist for you to use if you need it, and for me to dogfood again later. Enjoy!

https://gist.github.com/c68d8ea53eaf86f588d4716077448a64

How To Download All Containers And Blobs In Azure With Powershell
https://dillieo.me/posts/development/2016-10-21-how-to-download-all-containers-and-blobs-in-azure-with-powershell/
Author
Sean Patterson
Published on
2016-10-21
License
CC BY-NC-SA 4.0