Commands › Exchange Online

Set-MailboxImportRequest

Exchange Online ExchangeOnlineManagement Set-*

Change import request options after the request is created. You can use the Set-MailboxImportRequest cmdlet to recover from failed import requests. To use this cmdlet, you need to add the Mailbox Import Export role to a role group (for example, to the Organization Management role group). For more information, see Add a role to a role group.

Quick start script

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

# 3. Make the change (dry run first)
Set-MailboxImportRequest -Identity <MailboxImportRequestIdParameter> -AzureSharedAccessSignatureToken <String> -RehomeRequest <SwitchParameter> -WhatIf
Set-MailboxImportRequest -Identity <MailboxImportRequestIdParameter> -AzureSharedAccessSignatureToken <String> -RehomeRequest <SwitchParameter>

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

Syntax — 3 parameter sets

Identity

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

Rehome

Set-MailboxImportRequest [-Identity] <MailboxImportRequestIdParameter> [-RehomeRequest]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-RequestExpiryInterval <Unlimited>]
 [-WhatIf]
 [<CommonParameters>]

Default

Set-MailboxImportRequest [-Identity] <MailboxImportRequestIdParameter> [-AzureSharedAccessSignatureToken <String>]
 [-AcceptLargeDataLoss]
 [-BatchName <String>]
 [-CompletedRequestAgeLimit <Unlimited>]
 [-Confirm]
 [-RequestExpiryInterval <Unlimited>]
 [-SkipInitialConnectionValidation]
 [-SkipMerging <SkippableMergeComponent[]>]
 [-SkippedItemApprovalTime <System.DateTime>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (17)

ParameterTypeRequiredWhat it controls
-Identity MailboxImportRequestIdParameter yes The Identity parameter specifies the identity of the import request. By default, import requests are named `<alias>\MailboxImportX` (where X = 0-9). If you specified a name for the import request with the...
-AzureSharedAccessSignatureToken String yes This parameter is available only in the cloud-based service.
-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 the name of the batch.
-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 This parameter is available only in on-premises Exchange.
-InternalFlags InternalMrsFlag[] This parameter is available only in on-premises Exchange.
-LargeItemLimit Unlimited This parameter is available only in on-premises Exchange.
-Priority RequestPriority This parameter is available only in on-premises Exchange.
-RehomeRequest SwitchParameter yes This parameter is available only in on-premises Exchange.
-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...
-SkipInitialConnectionValidation SwitchParameter This parameter is available only in the cloud-based service
-SkipMerging SkippableMergeComponent[] The SkipMerging parameter specifies the steps in the import that should be skipped. This parameter is used primarily for debugging purposes.
-SkippedItemApprovalTime DateTime This parameter is available only in the cloud-based service
-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.