Azure CLI – Download All Blobs

If you ever need to get your files out of Azure this script will help you get your files out of Blob Storage

azBlob="<blob name>"
azContainer="<container name>"
azStorageKey="<primary or secondary storage key>"

fpDestination="$HOME/Desktop/$azBlob/$azContainer" # Change this to a path you want

mkdir -p $fpDestination

echo "Listing the blobs from $sContainer..."
az storage blob list --container-name $azContainer --output table --account-key $AZURE_STORAGE_ACCESS_KEY

echo "Download all blobs from $sContainer to $fpDestination..."
az storage blob download-batch --account-key $azStorageKey --destination $fpDestination --source $azContainer
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.