Skip to content

Instantly share code, notes, and snippets.

@chgeuer
Last active August 29, 2015 14:03
Show Gist options
  • Save chgeuer/3feb0e99967add3c0743 to your computer and use it in GitHub Desktop.
Save chgeuer/3feb0e99967add3c0743 to your computer and use it in GitHub Desktop.
Copy existing Azure blob to a different Azure blob
# 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