Commands › Exchange Online

Set-PublicFolderMigrationRequest

Exchange Online ExchangeOnlineManagement Set-*

Modify serial public folder migration requests (requests created by the New-PublicFolderMigrationRequest cmdlet). You can use this cmdlet to recover from failed migration requests. **Note**: Support for serial migration of public folders ended in Exchange 2013 Cumulative Update 8 (CU8), and the cmdlets are no longer available in Exchange Online. Instead, use the corresponding **\*-MigrationBatch** and **\*-PublicFolderMailboxMigration\*** cmdlets.

Quick start script

# Set-PublicFolderMigrationRequest — 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-PublicFolderMigrationRequest
$before | Format-List

# 3. Make the change (dry run first)
Set-PublicFolderMigrationRequest -Identity <PublicFolderMigrationRequestIdParameter> -RehomeRequest <SwitchParameter> -WhatIf
Set-PublicFolderMigrationRequest -Identity <PublicFolderMigrationRequestIdParameter> -RehomeRequest <SwitchParameter>

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

Syntax — 2 parameter sets

Identity

Set-PublicFolderMigrationRequest [-Identity] <PublicFolderMigrationRequestIdParameter>
 [-AcceptLargeDataLoss]
 [-BadItemLimit <Unlimited>]
 [-BatchName <String>]
 [-CompletedRequestAgeLimit <Unlimited>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-InternalFlags <InternalMrsFlag[]>]
 [-LargeItemLimit <Unlimited>]
 [-PreventCompletion <Boolean>]
 [-Priority <RequestPriority>]
 [-RequestExpiryInterval <Unlimited>]
 [-SkipMerging <SkippableMergeComponent[]>]
 [-WhatIf]
 [<CommonParameters>]

Rehome

Set-PublicFolderMigrationRequest [-Identity] <PublicFolderMigrationRequestIdParameter> -RehomeRequest
 [-Confirm]
 [-DomainController <Fqdn>]
 [-PreventCompletion <Boolean>]
 [-RequestExpiryInterval <Unlimited>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (15)

ParameterTypeRequiredWhat it controls
-Identity PublicFolderMigrationRequestIdParameter yes The Identity parameter specifies the migration request that you want to modify. You can use the following values:
-RehomeRequest SwitchParameter yes The RehomeRequest switch tells the Microsoft Exchange Mailbox Replication service (MRS) that the request needs to be moved to the same database as the public folder that's being migrated. You don't need to specify a...
-AcceptLargeDataLoss SwitchParameter The AcceptLargeDataLoss switch specifies the request should continue even if a large number of items in the source mailbox can't be copied to the target mailbox. You don't need to specify a value with this switch.
-BadItemLimit Unlimited The BadItemLimit parameter specifies the maximum number of bad items that are allowed before the request fails. A bad item is a corrupt item in the source mailbox that can't be copied to the target mailbox. Also...
-BatchName String The BatchName parameter specifies a descriptive name for the public folder batch migration. You can use the BatchName parameter as a search string when you use the Get-PublicFolderMigrationRequest cmdlet.
-CompletedRequestAgeLimit Unlimited The CompletedRequestAgeLimit parameter specifies how long the request is kept after it has completed before being automatically removed. The default CompletedRequestAgeLimit parameter value is 30 days.
-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.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-InternalFlags InternalMrsFlag[] The InternalFlags parameter specifies the optional steps in the request. This parameter is used primarily for debugging purposes.
-LargeItemLimit Unlimited The LargeItemLimit parameter specifies the maximum number of large items that are allowed before the request fails. A large item is a message in the source mailbox that exceeds the maximum message size that's allowed...
-PreventCompletion Boolean The PreventCompletion parameter specifies whether to run the migration request, but not allow it to complete. Valid values are:
-Priority RequestPriority The Priority parameter specifies the order in which the request should be processed in the request queue. Requests are processed in order, based on server health, status, priority, and last update time. Valid...
-RequestExpiryInterval Unlimited The RequestExpiryInterval parameter specifies an age limit for a completed or failed request. When you use this parameter, the completed or failed request is automatically removed after the specified interval...
-SkipMerging SkippableMergeComponent[] The SkipMerging parameter specifies whether certain stages of a migration are to be skipped for debugging purposes. Don't use this parameter unless directed to do so by Microsoft Customer Service and Support or...
-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.