Link to home
Start Free TrialLog in
Avatar of davesnb
davesnbFlag for Canada

asked on

Default subscription parameters Azure

I login with Login-AzureRmAccount


Get-AzureRmSubscription


SubscriptionName : Azure in Open
SubscriptionId   : c3527a38-236e-xxxxxxxxxxxxxxxxxxxxxx
TenantId         : 371bbe31-3426-xxxxxxxxxxxxxxxxxxxxxxx
State            : Enabled


Then I think I need to add a default subscription , however when I use :

Select-AzureSubscription -Default "Azure in Open"
Select-AzureSubscription : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1
+ Select-AzureSubscription -Default "Azure in Open"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Select-AzureSubscription], ParameterBindingException
    + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscriptionCommand
ASKER CERTIFIED SOLUTION
Avatar of Zachariah Browning
Zachariah Browning
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davesnb

ASKER

perfect. thanks
Avatar of davesnb

ASKER

I still receive the below, is there something wrong with the account ?

Get-AzureRmSubscription


SubscriptionName : Azure in Open
SubscriptionId   : c3527a38-236e-430a-xxxxxxxxxxxxxxxxxx
TenantId         : 371bbe31-3426-4c44-xxxxxxxxxxxxxx
State            : Enabled



Select-AzureSubscription -SubscriptionId "c3527a38-236e-430a-xxxxxxxxxxxxxxxxx"
Select-AzureSubscription : The subscription id c3527a38-236e-430a-xxxxxxxxxxxxxxxxx  doesn't exist.




Select-AzureSubscription -SubscriptionName "Azure in Open" -Default
Select-AzureSubscription : The subscription name Azure in Open doesn't exist.
Parameter name: name
At line:1 char:1
+ Select-AzureSubscription -SubscriptionName "Azure in Open" -Default
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Select-AzureSubscription], ArgumentException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscriptionCommand
Make sure you have your account active.
you can do a Get-AzureAccount to list your account and subscriptions. Add-AzureAccount to login to your account. I prefer the Add-AzureAccount method over importing azure settings profile. but the azure settings profile is technically better if you use the same account and want to always be logged in.
the Select-Azure Subscription -SubscriptionId [subscriptionId] should be in the list given from Get-AzureAccount
Avatar of davesnb

ASKER

so when I use Get-AzureAccount nothingn returns, then :

Add-AzureAccount
Add-AzureAccount : The given key was not present in the dictionary.
log into the Azure Portal and make sure your account is active, and you are beyond the "welcome wizard" and all of the start stuff, make sure you have a subscription. If you do, then in powershell run

Remove-AzureAccount
Clear-AzureProfile
Add-AzureAccount

if you STILL have the problem after that reinstall Azure Powershell