在PowerShell中查询租户ID [英] Query tenant ID in PowerShell

查看:110
本文介绍了在PowerShell中查询租户ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在订阅中创建了一个附加的Azure AD.如何使用PowerShell **检索租户ID,以便现在可以使用PowerShell针对该目录运行自动化.


Corey Hynes

I have created an additional Azure AD in my subscription.  How do I retrieve the tenant ID **using PowerShell** so I can now run automation against that directory using PowerShell. 


Corey Hynes

推荐答案

否,从今天起,Powershell无法知道您创建的其他租户的租户ID.

No, as of today getting to know by Powershell the Tenant ID of an additional tenant that you have created, is not possible.

Login-AzureRmAccount

此cmdlet将列出您的订阅链接到的默认租户的租户ID.

This cmdlet would list the Tenant ID of the default tenant that your Subscription is linked to.

-------------------- -------------------------------------------------- -----------



这篇关于在PowerShell中查询租户ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆