I'm new to both Azure and Powershell. I'm trying to connect to a specific Storage Account to upload some files, but it keeps selecting another storage account that's within my Azure account.
$StorageContainerName = "mycontainername"
$StorageAccountName = "myaccountname"
$StorageAccountKey = "thisisafakekey=="
New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey
New-AzureStorageContainer $StorageAccountName -Name $StorageContainerName -Permission Off
Get-ChildItem –Path C:\documents\* | Set-AzureStorageBlobContent -Container $StorageContainerName
The above results in the container and my files being uploaded to another storage account, let's call it 'otherstorageaccount'
From the portal I can see that 'myaccountname' is of type 'Storage account' and 'otherstorageaccount' is of type 'Storage account (classic)' - I don't know if this has any bearing on the outcome. Also, I've checked the key and it's correct.
Thanks for any help