没有指定默认订阅. [英] No default subscription has been designated.
问题描述
嗨!
我收到以下消息
PS C:\ users \ abc \ documents \ node \ demonode> Select-AzureRmSubscription -SubscriptionName即付即用11
姓名   ;:即付即用11(xxx-xxxx-xxxx-xxxx-xxxxxx)-abc@gmail.com
帐户 :abc@gmail.com
SubscriptionName:现收现付
租户编号 :xxxx-xxxx-xxxx-xxxx-xxxxxxxx
环境 :AzureCloud
PS C:\ users \ abc \ documents \ node \ demonode> Publish-AzureServiceProject -ServiceName mychatapp-位置美国东部"; -启动
Publish-AzureServiceProject:未指定默认订阅.使用Select-AzureSubscription-默认
< subscriptionName>设置默认订阅.
строка:1знак:1
+ Publish-AzureServiceProject -ServiceName mychatapp-位置美国东部...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo :CloseError:(:) [Publish-AzureServiceProject],ApplicationException
+ FullyQualifiedErrorId:Microsoft.WindowsAzure.Commands.CloudService.PublishAzureServiceProjectCommand
PS C:\ users \ abc \ documents \ node \ demonode> Select-AzureSubscription-默认即付即用
Select-Azure订阅:Неудаетсяразрешитьнаборпараметровсиспользованиемуказанныхименованныхпараметров + Select-Azure订阅-默认即付即用
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo :InvalidArgument:(:) [Select-AzureSubscription],ParameterBindingException
+ FullyQualifiedErrorId:AmbiguousParameterSet,Microsoft.WindowsAzure.Commands.Profile.SelectAzureSubscriptionCom
mand
请帮忙!
由于您使用的是Azure服务管理(ASM)cmdlet, 您需要使用"Add-AzureAccount"登录并使用"发布- AzureServiceProject ".
您可以按照以下步骤选择正确的订阅.
对于ASM模型:
登录到经典模型帐户.
Add-AzureAccount
使用以下命令获取可用的订阅:
Get-AzureSubscription |排序SubscriptionName |选择SubscriptionName
设置当前会话的Azure订阅.本示例将默认订阅设置为我的Azure订阅".用您自己的示例名称替换示例订阅名称.
Select-AzureSubscription – SubscriptionName我的Azure订阅"
对于ARM模型:
登录到用于ARM模型的帐户.
Add- AzureRmAccount
要更改当前订阅,请使用以下步骤:
步骤1: Get-AzureRmSubscription
它将列出您的所有订阅.
步骤2: Select-AzureRmSubscription -SubscriptionId xxxxx- xxx-xxx-xxxx
可以在Get-AzureRmSubscription的输出中找到SubscriptionID.您还可以使用SubscriptionName.
步骤3:(Get-AzureRmContext).
确认您已选择正确的订阅. >
让我知道是否还有其他需要解决的问题.
--------------- -------------------------------------------------- ------------------------------
如果此答案有帮助,请单击"标记为答案"或"投票".要提供有关您的论坛体验的其他反馈,请单击 在这里 >>
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!
解决方案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
这篇关于没有指定默认订阅.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!