Skip to content

Instantly share code, notes, and snippets.

@pkirch
Created April 2, 2015 16:13
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/569c7880d630ddde95bb to your computer and use it in GitHub Desktop.
Save pkirch/569c7880d630ddde95bb 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 BLOBs from container 'source1' into 'source2'. Each copy command shows the copied BLOBs."
"--> Copy BLOB 'Test1.txt'."
Start-AzureStorageBlobCopy -SrcBlob "Test1.txt" -SrcContainer source1 -DestContainer source2
"--> Copy BLOB 'Test2.txt'."
Start-AzureStorageBlobCopy -SrcBlob "Test2.txt" -SrcContainer source1 -DestContainer source2
"--> Display BLOBs in 'source2'."
Get-AzureStorageBlob -Container 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 BLOBs from container 'source1' into 'source2'. Each copy command shows the copied BLOBs.
--> Copy BLOB 'Test1.txt'.
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:12:06 +00:00
--> Copy BLOB 'Test2.txt'.
Test2.txt BlockBlob 18 text/plain 02.04.2015 16:12:08 +00:00
--> Display BLOBs in 'source2'.
Test1.txt BlockBlob 18 text/plain 02.04.2015 16:12:06 +00:00
Test2.txt BlockBlob 18 text/plain 02.04.2015 16:12:08 +00:00
#>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment