0
votes

I can logon to the Azure Portal using my MSN account. From the portal, I can see the several storage accounts I have created. But I want to do this from PowerShell. So I use the Azure module and issue this command:

Get-AzureStorageAccount

I get the error: Psh[Cookham8:Cert:\CurrentUser\my]> get-azurestorageaccount get-azurestorageaccount : Account with name '[email protected]' does not exist. Parameter name: accountName

Two things: first the account that Get-AzureStorageAccount is reporting as non existent works perfectly when I login to the portal.

Second: what accountName parameter - that parameter does not exist in the cmdlet?

How do I get Azure to see accounts that exist?

2
This appears to have been a glitch in Azure. I came back to the same machine and this now works fine. It must have been a glitch in Azure.Thomas Lee

2 Answers

0
votes

Have you ran add-azureaccount? When you do that, you will be prompted to login using your Azure account credentials. You should also...

Set subscription name. It can be found in the Storage account dashboard in the portal

$SubscriptionName="YourSubscriptionName"

Set Storage account name

$StorageAccountName="yourstorageaccountname"

Set Location

$Location = "West US"

Set default Azure subscription

Select-AzureSubscription -SubscriptionName $SubscriptionName –Default

Set a default storage account.

Set-AzureSubscription -CurrentStorageAccountName $StorageAccountName -SubscriptionName $SubscriptionName

After doing this, get-azurestorageaccount should work. This article might also be helpful http://azure.microsoft.com/en-us/documentation/articles/storage-powershell-guide-full/

0
votes

I had the error noted above for several hours. After posting here, I left it, and went home. Came back the next day and it works. I have other Azure cmdlet issues, but this one is resolved!

The suggestions around accounts is good (although I had dealt with that already).