Get-MigrationBatch

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

使用 Get-MigrationBatch cmdlet 可检索有关当前迁移批次的状态信息。

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

语法

Get-MigrationBatch
   [[-Identity] <MigrationBatchIdParameter>]
   [-Diagnostic]
   [-DiagnosticArgument <String>]
   [-DiagnosticInfo <String>]
   [-DomainController <Fqdn>]
   [-IncludeReport]
   [-Partition <MailboxIdParameter>]
   [-ResultSize <Unlimited>]
   [-Status <MigrationBatchStatus>]
   [<CommonParameters>]
Get-MigrationBatch
   [-Diagnostic]
   [-DiagnosticArgument <String>]
   [-DomainController <Fqdn>]
   [-Endpoint <MigrationEndpointIdParameter>]
   [-IncludeReport]
   [-Status <MigrationBatchStatus>]
   [<CommonParameters>]
Get-MigrationBatch
   [-DiagnosticInfo <String>]
   [-Endpoint <MigrationEndpointIdParameter>]
   [-IncludeReport]
   [-Partition <MailboxIdParameter>]
   [-ResultSize <Unlimited>]
   [<CommonParameters>]
Get-MigrationBatch
   [-DiagnosticInfo <String>]
   [-IncludeReport]
   [-Partition <MailboxIdParameter>]
   [-ResultSize <Unlimited>]
   [-Status <MigrationBatchStatus>]
   [<CommonParameters>]

说明

Get-MigrationBatch cmdlet 可显示有关当前迁移批次的状态信息。 这些状态信息包括:

  • 迁移批次的状态
  • 正在迁移的邮箱总数
  • 成功完成迁移的次数
  • 迁移错误次数
  • 迁移开始和完成的日期和时间。

您必须先获得权限,然后才能运行此 cmdlet。 虽然本主题中列出了此 cmdlet 的所有参数,但如果这些参数并未包含在分配给您的权限中,那么您将无法使用这些参数。 若要查找在贵组织中运行任何 cmdlet 或参数所需的权限,请参阅 Find the permissions required to run any Exchange cmdlet

注意:在基于云的服务中,如果不在 New-MigrationBatch 命令中使用 TimeZone 参数,则迁移批处理的默认时区为 UTC。 CompleteAfter 和 CompleteAfterUTC 属性将包含与 StartAfter 和 StartAfterUTC 属性) 相同的值 (。 在 Exchange 管理中心 (EAC) 中创建迁移批处理时,使用的时区取决于区域配置。

示例

示例 1

Get-MigrationBatch -Identity LocalMove2

此示例显示了迁移批处理 LocalMove2 的状态信息。

示例 2

Get-MigrationBatch -Endpoint exsrv1.contoso.com

此示例显示了有关与迁移终结点 exsrv1.contoso.com 关联的所有迁移批处理的信息。

参数

-Diagnostic

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

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

Diagnostic 开关指定是否在结果中返回非常详细的信息。 不必为此开关指定值。

通常情况下,仅在应 Microsoft 客户服务和支持部门请求排查问题时,才使用此开关。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-DiagnosticArgument

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

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

DiagnosticArgument 参数修改使用 Diagnostic 开关返回的结果。 通常情况下,仅在应 Microsoft 客户服务和支持部门请求排查问题时,才使用 Diagnostic 开关和 DiagnosticArgument 参数。

类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-DiagnosticInfo

适用:Exchange Online

此参数仅在基于云的服务中可用。

通常,仅在Microsoft Customer Service 和 Support 的请求下使用 DiagnosticInfo 参数来解决问题。 有效值包含:

  • attachmentid=String
  • batch=String
  • 确认
  • duration=String
  • endpoints
  • endtime=DateTime
  • maxsize=Int32
  • organization=String
  • partition=String
  • reportid=String
  • 报告
  • showtimeline
  • showtimeslots=String
  • starttime=DateTime
  • status=String
  • storage
  • type=String
  • user=String
  • 详细
类型:String
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-DomainController

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

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

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

类型:Fqdn
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Endpoint

适用:Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Online

Endpoint 参数返回与指定的迁移终结点关联的迁移批次列表。

如果使用此参数,则不能包括 Identity 参数。

类型:MigrationEndpointIdParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Identity

适用:Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Online

Identity 参数标识当前迁移批次的名称。 此参数的值由 Name 参数为 New-MigrationBatch cmdlet 指定。

如果使用此参数,则不能包括 Endpoint 参数。

类型:MigrationBatchIdParameter
Position:1
默认值:None
必需:False
接受管道输入:True
接受通配符:False

-IncludeReport

适用:Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Online

IncludeReport 开关返回有关指定迁移批处理的其他信息。 不必为此开关指定值。

此信息显示在 Report 字段中。

类型:SwitchParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Partition

适用:Exchange Online

此参数仅在基于云的服务中可用。

保留此参数以供 Microsoft 内部使用。

类型:MailboxIdParameter
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-ResultSize

适用:Exchange Online

此参数仅在基于云的服务中可用。

ResultSize 参数指定了要返回的结果的最大数量。 若要返回所有与查询相匹配的请求,则请将此参数的值设为无限制。 默认值为 1000。

类型:Unlimited
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

-Status

适用:Exchange Server 2013、Exchange Server 2016、Exchange Server 2019、Exchange Online

Status 参数返回具有指定状态的迁移批次列表。 使用下列值之一:

  • 已完成
  • CompletedWithErrors
  • 完成
  • 已损坏
  • 已创建
  • 已失败
  • IncrementalSyncing
  • 删除
  • 即将开始
  • 已停止
  • 正在同步
  • 停止
  • 已同步
  • SyncedwithErrors
  • 等待
类型:MMigrationBatchStatus
Position:Named
默认值:None
必需:False
接受管道输入:False
接受通配符:False

输入

Input types

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

输出

Output types

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