Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pmatthews05
Last active April 8, 2021 15:22
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 pmatthews05/e2e151b5611b137ad5f84ec43ddfeb22 to your computer and use it in GitHub Desktop.
Save pmatthews05/e2e151b5611b137ad5f84ec43ddfeb22 to your computer and use it in GitHub Desktop.
azcli Migration
$SourceAccountName = "[SOURCEACCOUNTNAME]"
$SourceContainer = "[SOURCECONTAINERNAME]"
#Read and List
#Ensure SourceBlobSAS is in single and double quotes for PowerShell
$SourceBlobSAS = '"[SOURCESAS]"'
$DestinationAccountName = "[DESTINATIONACCOUNTNAME]"
$DestinationContainer = "[DESTINATIONCONTAINERNAME]"
#Full Access
#Ensure DestinationBlobSAS is in single and double quotes for PowerShell
$DestinationBlobSAS = '"[DESTINATIONSAS]"'
az storage blob copy start-batch --source-account-name $SourceAccountName `
--source-container $SourceContainer `
--source-sas $SourceBlobSAS `
--account-name $DestinationAccountName `
--destination-container $DestinationContainer `
--sas-token $DestinationBlobSAS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment