Skip to content

Instantly share code, notes, and snippets.

@pkirch
Created April 2, 2015 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkirch/86df2aa5be0b83bb713b to your computer and use it in GitHub Desktop.
Save pkirch/86df2aa5be0b83bb713b to your computer and use it in GitHub Desktop.
"--> Set current storage account."
Set-AzureSubscription -SubscriptionName "MSFT MVA Stage" -CurrentStorageAccountName "storagesource"
"--> Get blobs from containers 'source1' and 'source2' from current storage account (storagesource)."
Get-AzureStorageBlob -Container source1
Get-AzureStorageBlob -Container source2
"--> Copy all BLOBs with pattern '*.txt' from container 'source1' into 'source2'. The copy command shows processed BLOBs."
Get-AzureStorageBlob -Blob "*.txt" -Container source1 | Start-AzureStorageBlobCopy -DestContainer source2
<# Output
--> Set current storage account.
--> Get blobs from containers 'source1' and 'source2' from current storage account (storagesource).
Container Uri: https://storagesource.blob.core.windows.net/source1
Name BlobType Length ContentType LastModified SnapshotTime
---- -------- ------ ----------- ------------ ------------
Test1.txt BlockBlob 18 text/plain 02.04.2015 16:02:07 +00:00
Test2.txt BlockBlob 18 text/plain 02.04.2015 16:02:06 +00:00
Test3.txt BlockBlob 18 text/plain 02.04.2015 16:02:06 +00:00
--> Copy all BLOBs with pattern '*.txt' from container 'source1' into 'source2'. The copy command shows processed BLOBs.
Container Uri: https://storagesource.blob.core.windows.net/source2
Name BlobType Length ContentType LastModified SnapshotTime
---- -------- ------ ----------- ------------ ------------
Test1.txt BlockBlob 18 text/plain 02.04.2015 16:25:42 +00:00
Test2.txt BlockBlob 18 text/plain 02.04.2015 16:25:42 +00:00
Test3.txt BlockBlob 18 text/plain 02.04.2015 16:25:42 +00:00
#>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment