Commands › Exchange Online
Set-MailboxImportRequest
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)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.