当我登录到新的 Azure 门户时,我会在右上角看到一个下拉菜单,让我可以从 2 的列表中选择一个“目录”。当我使用 powershell cmdlet“Login-AzureRmAccount”登录到 azure 时,我已连接到错误的目录。如何从 Powershell 中切换到另一个目录?
Sam*_*gan 14
使用 Select-AzureRMSubscription 时需要指定 TenantID 参数:
Select-AzureRmSubscription -SubscripitionID <ID of sub> -TenantId <ID of Azure Tenant>
Run Code Online (Sandbox Code Playgroud)
您实际上可以只指定租户来选择目录,而无需订阅 ID。
Select-AzureRmSubscription -TenantId <ID of Azure Tenant>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
26442 次 |
最近记录: |