I am working with classic resources in Azure. I am running Azure powershell version 2.0.1 (updated it to see if that solved the issue below). I was wanting to check my list of VIPS, and am running some script I had for this in powershell.
$deployment = Get-AzureDeployment -ServiceName servicenamehere
$deployment.VirtualIPs
I am now getting the error
Get-AzureDeployment : Account with name '' does not exist.
Parameter name: accountName
At line:1 char:15
+ $deployment = Get-AzureDeployment -ServiceName servicenamehere
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Get-AzureDeployment], ArgumentException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceManagement.HostedServices.GetAzureDeploymentCommand
A variety of other statements return with the same error "Account with name '' does not exist." This was all executed after logging in and selecting my subscription, which works fine:
Add-AzureAccount
Select-AzureSubscription -SubscriptionName "subscriptionnamehere"
Any ideas on what is occurring on the statements that makes them fail with this accountName issue? Unsure if this has to do with resource manager changes or anything else new added in the last few months in Azure.
Other statements fail with the same error. Example
Add-AzureVirtualIP -VirtualIPName newvipname -ServiceName servicenamehere
Gives the same error
Add-AzureVirtualIP : Account with name '' does not exist.
Parameter name: accountName
Select-AzureSubscription -SubscriptionName "subscriptionnamehere" -Account "accountidhere"
(useGet-AzureAccount
to find correct account id) – Mathias R. Jessen