Created
January 12, 2018 13:58
-
-
Save deldersveld/d6c434e4a6fdc3adabdd7df8d1e44d4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Login-AzureRmAccount | |
$containerName = <<string containing container name>> | |
$storageContext = New-AzureStorageContext -ConnectionString <<connection string to storage account>> | |
$localDestinationPath = <<string containing file system path.>> | |
$blobPrefix = <<string containing prefix to search. wildcard character not needed after prefix.>> | |
#List | |
#Get-AzureStorageBlob -Context $storageContext -Container $containerName -Prefix $blobPrefix | |
#List and Download | |
Get-AzureStorageBlob -Context $storageContext -Container $containerName -Prefix $blobPrefix | ForEach-Object {Get-AzureStorageBlobContent -context $storageContext -Container $containerName -Blob $_.Name -Destination $localDestinationPath -Force} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment