Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Monday, September 24, 2018 8:37 PM
Hi!
I got the following message
PS C:\users\abc\documents\node\demonode> Select-AzureRmSubscription -SubscriptionName Pay-As-You-Go11
Name : Pay-As-You-Go11 (xxx-xxxx-xxxx-xxxx-xxxxxx) - abc@gmail.com
Account : abc@gmail.com
SubscriptionName : Pay-As-You-Go
TenantId : xxxx-xxxx-xxxx-xxxx-xxxxxxxx
Environment : AzureCloud
PS C:\users\abc\documents\node\demonode> Publish-AzureServiceProject -ServiceName mychatapp -Location "East US" -Launch
Publish-AzureServiceProject : No default subscription has been designated. Use Select-AzureSubscription -Default
<subscriptionName> to set the default subscription.
строка:1 знак:1
- Publish-AzureServiceProject -ServiceName mychatapp -Location "East US ...
-
+ CategoryInfo : CloseError: (:) [Publish-AzureServiceProject], ApplicationException
+ FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.CloudService.PublishAzureServiceProjectCommand
PS C:\users\abc\documents\node\demonode> Select-AzureSubscription -Default Pay-As-You-Go
Select-AzureSubscription : Не удается разрешить набор параметров с использованием указанных именованных параметров.
строка:1 знак:1
- Select-AzureSubscription -Default Pay-As-You-Go
-
+ CategoryInfo : InvalidArgument: (:) [Select-AzureSubscription], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscriptionCom
mand
Help please!
All replies (3)
Tuesday, September 25, 2018 2:30 AM
Note: Since you are using Azure Service Management (ASM) cmdlet, you need to use “Add-AzureAccount” to login and use the “Publish-AzureServiceProject”.
You may use the following steps to select the right subscription.
For ASM model:
Sign in to your account for the classic model.
Add-AzureAccount
Get the available subscriptions by using the following command:
Get-AzureSubscription | Sort SubscriptionName | Select SubscriptionName
Set your Azure subscription for the current session. This example sets the default subscription to My Azure Subscription. Replace the example subscription name with your own.
Select-AzureSubscription –SubscriptionName "My Azure Subscription"
For ARM model:
Sign in to your account for the ARM model.
** Add-AzureRmAccount**
To change the current subscription, use the following steps:
Step 1: Get-AzureRmSubscription
It will List all your subscriptions.
Step 2: Select-AzureRmSubscription -SubscriptionId xxxxx-xxx-xxx-xxxx
The SubscriptionID can be found in the output of the Get-AzureRmSubscription. You can also use the SubscriptionName.
Step 3: (Get-AzureRmContext).Subscription
Confirm that you have selected the right subscription.
Let me know if there are still any additional issues I can help with.
If this answer was helpful, click “Mark as Answer” or “Up-Vote”. To provide additional feedback on your forum experience, click here
Tuesday, September 25, 2018 8:02 PM
Hi again!
Unfortunately it's not helpful. Please explain: I tried
PS C:\users\oly\documents\node\expressChat\webrole1> Select-AzureRmSubscription -SubscriptionId ***-****-*****-****-*****
And the result
Name : Pay-As-You-Go11 (***-****-*****-****-*****) - abc@gmail.com
Account : abc@gmail.com
SubscriptionName : Pay-As-You-Go11
TenantId : xxxx-xxxx-xxxx-xxxx-xxxxxxxx4
Environment : AzureCloud
Then
PS C:\users\oly\documents\node\expressChat\webrole1> Select-AzureSubscription -Default -SubscriptionName "Pay-As-You-Go11"
and the result
Select-AzureSubscription : The subscription name Pay-As-You-Go11 doesn't exist.
Thank you
Wednesday, September 26, 2018 3:07 AM
You may try the below mentioned cmdlet to select the right subscription.

You may refer the suggestions outlined on the SO thread, which addresses similar issue.