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.
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!