Set-AzContext works in Azure Cloud Shell but doesn't in Azure PowerShell

前端 未结 3 862
难免孤独
难免孤独 2021-02-15 10:39

When i execute following command

Clear-AzureProfile
Connect-AzAccount -TenantID xxxxxxxxxxxxxxxxxxx
Set-AzContext -SubscriptionId xxxxxxxxxxxxxxxxxxx

3条回答
  •  生来不讨喜
    2021-02-15 10:45

    Close your powershell and open a new one, or use Clear-AzContext, not Clear-AzureProfile. Then use Connect-AzAccount -Tenant xxxxx -Subscription xxxxx, it should work.

提交回复
热议问题