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!

What are your 10 bits on the matter? I want to know!

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s