Commands › Exchange Online

Redirect-Message

Exchange Online ExchangeOnlineManagement Redirect-*

Drain the active messages from all the delivery queues on a Mailbox server, and transfer those messages to another Mailbox server.

Quick start script

# Redirect-Message — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Redirect-Message -Server <ServerIdParameter> -Target <MultiValuedProperty> | Format-List

# 3. Export for evidence / drift tracking
Redirect-Message | Export-Clixml .\Message-$(Get-Date -Format yyyyMMdd).xml

Syntax

Redirect-Message -Server <ServerIdParameter> -Target <MultiValuedProperty>
 [-Confirm]
 [-WhatIf]
 [<CommonParameters>]

Parameters (4)

ParameterTypeRequiredWhat it controls
-Server ServerIdParameter yes The Server parameter specifies the source Exchange server where you want to run this command. You can use any value that uniquely identifies the server. For example:
-Target MultiValuedProperty yes The Target parameter specifies the target Mailbox server where you want to transfer the messages from the drained delivery queues. Enter the server name as a fully qualified domain name (FQDN).
-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.
-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.