Get-ManagementScope

此 cmdlet 可在本地 Exchange 和基于云的服务中使用。 某些参数和设置可能只属于一个环境或另一个环境。

使用 Get-ManagementScope cmdlet 返回管理范围列表。

有关以下语法部分的参数设置的详细信息,请参阅 Exchange cmdlet 语法

语法

Default (默认值)

Get-ManagementScope
    [[-Identity] <ManagementScopeIdParameter>]
    [-DomainController <Fqdn>]
    [-Exclusive <Boolean>]
    [-Orphan]
    [<CommonParameters>]

说明

可以检索一个或多个范围,仅检索与管理角色分配不关联的范围,也可以检索排他范围或常规范围。

有关常规范围和独占范围的详细信息,请参阅 了解管理角色范围

您必须先获得权限,然后才能运行此 cmdlet。 尽管本文列出了 cmdlet 的所有参数,但如果某些参数未包含在分配给你的权限中,则可能无法访问这些参数。 若要查找在贵组织中运行任何 cmdlet 或参数所需的权限,请参阅 Find the permissions required to run any Exchange cmdlet

示例

示例 1

Get-ManagementScope Redmond*

此示例检索以字符串 Redmond 开头的所有管理范围。

示例 2

Get-ManagementScope "Redmond Servers Scope" | Format-List

此示例使用 Get-ManagementScope cmdlet 检索 Redmond 服务器范围,并将输出管道传递给 Format-List cmdlet。 有关 Format-List cmdlet 的详细信息,请参阅 使用命令输出

示例 3

Get-ManagementScope -Orphan

此示例检索未与任何角色分配关联的管理范围列表。

示例 4

Get-ManagementScope -Exclusive $True

此示例检索独占范围的列表。

参数

-DomainController

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE

此参数只在本地 Exchange 中可用。

DomainController 参数指定此 cmdlet 从 Active Directory 读取数据或向其写入数据时使用的域控制器。 可以使用完全限定的域名 (FQDN) 来标识域控制器。 例如,dc01.contoso.com。

参数属性

类型:Fqdn
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Exclusive

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE、Exchange Online、Exchange Online Protection

Exclusive 参数指定是否应返回独占范围。 如果未指定 Exclusive 参数,则返回常规范围和独占范围。 如果 Exclusive 参数设置为 $True,则仅返回独占范围。 如果 Exclusive 参数设置为 $False,则仅返回常规范围。 有效值为$True和$False。

参数属性

类型:Boolean
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Identity

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE、Exchange Online、Exchange Online Protection

Identity 参数指定要返回的管理范围的名称。 如果管理作用域名称包含空格,则使用引号 (") 括住该名称。

警告:identity 参数的值$null或不存在的值将返回 所有 对象,就像在没有 Identity 参数的情况下运行 Get- 命令一样。 验证 Identity 参数的任何值列表是否准确且不包含不存在$null值。

参数属性

类型:ManagementScopeIdParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:1
必需:False
来自管道的值:True
来自管道的值(按属性名称):True
来自剩余参数的值:False

-Orphan

适用:Exchange Server 2010、Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Server SE、Exchange Online、Exchange Online Protection

孤立开关指定是否仅返回不与角色分配关联的管理范围。 不必为此开关指定值。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

Input types

若要了解此 cmdlet 接受的输入类型,请参阅 cmdlet 的输入和输出类型。 如果 cmdlet 的"输入类型"字段为空,则表明此 cmdlet 不接受输入数据。

输出

Output types

若要了解此 cmdlet 接受的返回类型(亦称为"输出类型"),请参阅 cmdlet 的输入和输出类型。 如果"输出类型"字段为空,则表明此 cmdlet 不返回任何数据。