Commands › Exchange Online

Set-MigrationBatch

Exchange Online ExchangeOnlineManagement Set-*

Update a migration request for a batch of users. For more information, see New-MigrationBatch.

Quick start script

# Set-MigrationBatch — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-MigrationBatch
$before | Format-List

# 3. Make the change (dry run first)
Set-MigrationBatch -Identity <MigrationBatchIdParameter> -WhatIf
Set-MigrationBatch -Identity <MigrationBatchIdParameter>

# 4. Verify and diff
$after = Get-MigrationBatch
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-MigrationBatch [-Identity] <MigrationBatchIdParameter>
 [-AddUsers]
 [-AllowIncrementalSyncs <Boolean>]
 [-AllowUnknownColumnsInCsv <Boolean>]
 [-ApproveSkippedItems]
 [-AutoRetryCount <Int32>]
 [-BadItemLimit <Unlimited>]
 [-CSVData <Byte[]>]
 [-CompleteAfter <DateTime>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-LargeItemLimit <Unlimited>]
 [-MoveOptions <MultiValuedProperty>]
 [-NotificationEmails <MultiValuedProperty>]
 [-Partition <MailboxIdParameter>]
 [-ReportInterval <TimeSpan>]
 [-SkipMerging <MultiValuedProperty>]
 [-SkipMoving <MultiValuedProperty>]
 [-SkipReports <Boolean>]
 [-SourcePublicFolderDatabase <DatabaseIdParameter>]
 [-StartAfter <DateTime>]
 [-SyncNow]
 [-Update]
 [-WhatIf]
 [<CommonParameters>]

Parameters (24)

ParameterTypeRequiredWhat it controls
-Identity MigrationBatchIdParameter yes The Identity parameter specifies the migration batch that you want to modify. You can use any value that uniquely identifies the migration batch. For example:
-AddUsers SwitchParameter This parameter is available only in the cloud-based service.
-AllowIncrementalSyncs Boolean This parameter is available only in on-premises Exchange.
-AllowUnknownColumnsInCsv Boolean The AllowUnknownColumnsInCsv parameter specifies whether to allow extra columns in the CSV file that aren't used by migration. Valid values are:
-ApproveSkippedItems SwitchParameter This parameter is available only in the cloud-based service.
-AutoRetryCount Int32 This parameter is available only in on-premises Exchange.
-BadItemLimit Unlimited This parameter is available only in on-premises Exchange.
-CompleteAfter DateTime This parameter is functional only in the cloud-based service.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-CSVData Byte[] The CSVData parameter specifies the CSV file that contains information about the user mailboxes to be moved or migrated. The required attributes in the header row of the CSV file vary depending on the type of migration.
-DomainController Fqdn This parameter is available only in on-premises Exchange.
-LargeItemLimit Unlimited This parameter is available only in on-premises Exchange.
-MoveOptions MultiValuedProperty The MoveOptions parameter specifies the stages of the migration that you want to skip for debugging purposes. Don't use this parameter unless you're directed to do so by Microsoft Customer Service and Support or...
-NotificationEmails MultiValuedProperty The NotificationEmails parameter specifies one or more email addresses that migration status reports are sent to.
-Partition MailboxIdParameter This parameter is available only in the cloud-based service.
-ReportInterval TimeSpan The ReportInterval parameter specifies how frequently emailed reports should be sent to the email addresses listed within NotificationEmails.
-SkipMerging MultiValuedProperty The SkipMerging parameter specifies the stages of the migration that you want to skip for debugging purposes. Don't use this parameter unless you're directed to do so by Microsoft Customer Service and Support or...
-SkipMoving MultiValuedProperty This parameter is replaced by the MoveOptions parameter.
-SkipReports Boolean The SkipReports switch specifies that you want to skip automatic reporting for the migration. You don't need to specify a value with this switch.
-SourcePublicFolderDatabase DatabaseIdParameter This parameter is available only in on-premises Exchange.
-StartAfter DateTime The StartAfter parameter specifies a delay before the data migration for the users within the batch is started. The migration is prepared, but the actual data migration for users within the batch doesn't start until...
-SyncNow SwitchParameter The SyncNow switch starts an immediate sync for users that have already reached Synced status, but doesn't resume any Failed users. You don't need to specify a value with this switch.
-Update SwitchParameter The Update switch sets the Update flag on the migration batch. You don't need to specify a value with this switch.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.