Last active
August 29, 2015 14:03
-
-
Save chgeuer/3feb0e99967add3c0743 to your computer and use it in GitHub Desktop.
Copy existing Azure blob to a different Azure blob
This file contains 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
# Copy existing Azure blob to a different Azure blob. | |
# Main point of this sample is to see the sample data values. | |
$context = New-AzureStorageContext ` | |
-StorageAccountName storageaccount123 ` | |
-StorageAccountKey deadbeef123== | |
Start-AzureStorageBlobCopy ` | |
-SrcContext $context ` | |
-SrcContainer "vhds" ` | |
-SrcBlob "existing-osdisk.vhd" ` | |
-DestContext $context ` | |
-DestContainer "vhds" ` | |
-DestBlob "new-osdisk.vhd" | |
# Wait in a loop or something :-) | |
Get-AzureStorageBlobCopyState ` | |
-Context $context ` | |
-Container "vhds" ` | |
-Blob "new-osdisk.vhd" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment