Azure CLI Bash for windows platform

Frequent Visitor

Hi All,

 

I am trying to copy blob data from one Azure Subscription to another Azure Subscription using Azure CLI Bash for windows.

I am able to set the below ENVIRONMENT VARIABLES successfully

Set AZURE_STORAGE_ACCOUNT=<YourStorageAccount>

Set AZURE_STORAGE_ACCESS_KEY=<YourStorageAccessKey>

Issue 1:

However, when I am trying to create a container in the Azure Storage account as specified in the  AZURE_STORAGE_ACCOUNT unable to do so using below command

az storage container create --name nyctaxi-staging

Meanwhile, Below command able to create container successfully by explicitly mentioning Azure Storage Account Name as an option

az storage container create --name nyctaxi-staging --account-name <YourStorageAccount>

 

Issue2: Unable to access the ENVIRONMENT VARIABLE values. Tried different option but none of the options are working

  • $AZURE_STORAGE_ACCOUNT
  • ${AZURE_STORAGE_ACCOUNT}
  • %AZURE_STORAGE_ACCOUNT%

Please suggest how to get this resolved. Thanks

Regards

Vibhas Kashyap

 

 

2 Replies

@vibhas_kashyap 

Hello! You've posted your question in the Tech Community Discussion space, which is intended for discussion around the Tech Community website itself, not product questions. I'm moving your question to the Azure discussion space - please post Azure questions here in the future. 

Hi, Vibhas. Did you get this sorted?

I recommend taking a look at AzCopy (https://docs.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?WT.mc_id=AZ-MVP-5004796)
Which will help you transfer data across and to an Azure storage account.