davesnb
asked on
Default subscription parameters Azure
I login with Login-AzureRmAccount
Get-AzureRmSubscription
SubscriptionName : Azure in Open
SubscriptionId : c3527a38-236e-xxxxxxxxxxxx xxxxxxxxxx
TenantId : 371bbe31-3426-xxxxxxxxxxxx xxxxxxxxxx x
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,Micr osoft.Wind owsAzure.C ommands.Pr ofile.Sele ctAzureSub scriptionC ommand
Get-AzureRmSubscription
SubscriptionName : Azure in Open
SubscriptionId : c3527a38-236e-xxxxxxxxxxxx
TenantId : 371bbe31-3426-xxxxxxxxxxxx
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]
+ FullyQualifiedErrorId : AmbiguousParameterSet,Micr
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I still receive the below, is there something wrong with the account ?
Get-AzureRmSubscription
SubscriptionName : Azure in Open
SubscriptionId : c3527a38-236e-430a-xxxxxxx xxxxxxxxxx x
TenantId : 371bbe31-3426-4c44-xxxxxxx xxxxxxx
State : Enabled
Select-AzureSubscription -SubscriptionId "c3527a38-236e-430a-xxxxxx xxxxxxxxxx x"
Select-AzureSubscription : The subscription id c3527a38-236e-430a-xxxxxxx xxxxxxxxxx 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.Com mands.Prof ile.Select AzureSubsc riptionCom mand
Get-AzureRmSubscription
SubscriptionName : Azure in Open
SubscriptionId : c3527a38-236e-430a-xxxxxxx
TenantId : 371bbe31-3426-4c44-xxxxxxx
State : Enabled
Select-AzureSubscription -SubscriptionId "c3527a38-236e-430a-xxxxxx
Select-AzureSubscription : The subscription id c3527a38-236e-430a-xxxxxxx
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]
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Com
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
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
ASKER
so when I use Get-AzureAccount nothingn returns, then :
Add-AzureAccount
Add-AzureAccount : The given key was not present in the dictionary.
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
Remove-AzureAccount
Clear-AzureProfile
Add-AzureAccount
if you STILL have the problem after that reinstall Azure Powershell
ASKER