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