Commands › Exchange Online

Set-MailboxRestoreRequest

Exchange Online ExchangeOnlineManagement Set-*

Change restore request options after the request is created. You can use this cmdlet to recover from failed restore requests.

Quick start script

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

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

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

Syntax — 2 parameter sets

Identity

Set-MailboxRestoreRequest [-Identity] <MailboxRestoreRequestIdParameter>
 [-AcceptLargeDataLoss]
 [-BadItemLimit <Unlimited>]
 [-BatchName <String>]
 [-CompletedRequestAgeLimit <Unlimited>]
 [-Confirm]
 [-DomainController <Fqdn>]
 [-InternalFlags <InternalMrsFlag[]>]
 [-LargeItemLimit <Unlimited>]
 [-Priority <RequestPriority>]
 [-RemoteHostName <Fqdn>]
 [-RequestExpiryInterval <Unlimited>]
 [-SkipInitialConnectionValidation]
 [-SkipMerging <SkippableMergeComponent[]>]
 [-SkippedItemApprovalTime <DateTime>]
 [-SourceWlmLevel <WlmLevel>]
 [-TargetWlmLevel <WlmLevel>]
 [-WhatIf]
 [<CommonParameters>]

Rehome

Set-MailboxRestoreRequest [-Identity] <MailboxRestoreRequestIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-RehomeRequest]
 [-RemoteHostName <Fqdn>]
 [-RequestExpiryInterval <Unlimited>]
 [-SkipInitialConnectionValidation]
 [-SkippedItemApprovalTime <DateTime>]
 [-SourceWlmLevel <WlmLevel>]
 [-TargetWlmLevel <WlmLevel>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (19)

ParameterTypeRequiredWhat it controls
-Identity MailboxRestoreRequestIdParameter yes The Identity parameter specifies the identity of the restore request. The Identity parameter consists of the alias of the mailbox to be restored and the name that was specified when the restore request was created....
-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 This parameter is available only in on-premises Exchange.
-BatchName String The BatchName parameter specifies the name of the batch. Use this parameter to change, create, or remove a batch name.
-CompletedRequestAgeLimit Unlimited The CompletedRequestAgeLimit parameter specifies how long the status of a completed restore request is set to Completed. If this parameter is set to a value of 0, the status is cleared immediately instead of changing...
-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 functional only in on-premises Exchange.
-InternalFlags InternalMrsFlag[] This parameter is functional only in on-premises Exchange.
-LargeItemLimit Unlimited This parameter is available only in on-premises Exchange.
-Priority RequestPriority This parameter is functional only in on-premises Exchange.
-RehomeRequest SwitchParameter yes This parameter is functional only in on-premises Exchange.
-RemoteHostName Fqdn This parameter is reserved for internal Microsoft use.
-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 folder-related items to skip when restoring the mailbox. Use one of the following values:
-SkippedItemApprovalTime DateTime This parameter is available only in the cloud-based service.
-SourceWlmLevel WlmLevel This parameter is available only in the cloud-based service.
-TargetWlmLevel WlmLevel 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.