Set-AzContext works in Azure Cloud Shell but doesn't in Azure PowerShell
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.
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.