No default subscription has been designated. Use Select-AzureSubscription -Default to set the default subscription

前端 未结 2 941
时光取名叫无心
时光取名叫无心 2021-01-04 18:28

I’m keep getting the above error when trying to execute Start-AzureService.

Following information prompted when executing Get-AzureAccount:

Id              


        
2条回答
  •  醉梦人生
    2021-01-04 19:10

    When I tried to Select-AzureSubscription it was giving me the error "Subscription does not exist" when I was passing 100% correct subscription name or subscription Id that I found on Azure portal and from powershell:

    $account = Login-AzureRmAccount
    $account.Context.Subscription.SubscriptionId
    $account.Context.Subscription.SubscriptionName
    

    Adding Azure account fixed the problem for me:

    Add-AzureAccount
    

提交回复
热议问题