I've inherited a Powershell script that runs in an Azure RunBook. In the script we need to read a StorageQueue. I'm having issues connecting to the StorageAccount.
The following snippet fails on New-AzureStorageContext, because the $connectionString is Empty.
$storageContext = (Get-AzureRMStorageAccount | Where { $_.StorageAccountName -eq $storageAccountName }).Context
$connectionString = $storageContext.ConnectionString
$storageContextNew = New-AzureStorageContext -ConnectionString $connectionString
$queues = Get-AzureStorageQueue -Prefix $queueNamePrefix -Context $storageContextNew
How can I fix this so I have the ConnectionString and can connect to the Queue?