Get-EntraDomain
获取域。
语法
GetQuery (默认值)
Get-EntraDomain
[-Property <String[]>]
[<CommonParameters>]
GetById
Get-EntraDomain
-Name <String>
[-Property <String[]>]
[<CommonParameters>]
说明
该 Get-EntraDomain cmdlet 获取Microsoft Entra ID中的域。
工作或学校帐户必须至少分配给以下Microsoft Entra角色之一:
- 用户管理员
- 服务台管理员
- 服务支持管理员
- 目录读取器
- 即席许可证管理员
- 应用程序管理员
- 安全阅读器
- 安全管理员
- 特权角色管理员
- 云应用程序管理员
示例
示例 1:获取创建的域列表
Connect-Entra -Scopes 'Domain.Read.All'
Get-EntraDomain
Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays
-- ------------------ ------------------ -------------- --------- --------- ------ ---------- --------------------------------
test22.com Managed True False False False False 13
test33.com Managed True False False False False 15
test44.com Managed True False False False False 17
此命令检索域列表。
示例 2:获取特定域
Connect-Entra -Scopes 'Domain.Read.All'
Get-EntraDomain -Name TEST22.com
Id AuthenticationType AvailabilityStatus IsAdminManaged IsDefault IsInitial IsRoot IsVerified PasswordNotificationWindowInDays
-- ------------------ ------------------ -------------- --------- --------- ------ ---------- --------------------------------
test22.com Managed True False False False False 13
此命令检索具有指定名称的域。
参数
-Name
指定域的名称。
参数属性
| 类型: | System.String |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
参数集
GetById
| Position: | Named |
| 必需: | True |
| 来自管道的值: | True |
| 来自管道的值(按属性名称): | True |
| 来自剩余参数的值: | False |
-Property
指定要返回的属性。
参数属性
| 类型: | System.String[] |
| 默认值: | None |
| 支持通配符: | False |
| 不显示: | False |
| 别名: | Select |
参数集
(All)
| Position: | Named |
| 必需: | False |
| 来自管道的值: | False |
| 来自管道的值(按属性名称): | False |
| 来自剩余参数的值: | False |
CommonParameters
此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters。