Commands › Exchange Online

Test-ReplicationHealth

Exchange Online ExchangeOnlineManagement Test-*

Check all aspects of replication and replay, or to provide status for a specific Mailbox server in a database availability group (DAG).

Quick start script

# Test-ReplicationHealth — 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
Test-ReplicationHealth | Format-List

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

Syntax

Test-ReplicationHealth [[-Identity] <ServerIdParameter>]
 [-ActiveDirectoryTimeout <Int32>]
 [-Confirm]
 [-DatabaseAvailabilityGroup <DatabaseAvailabilityGroupIdParameter>]
 [-DomainController <Fqdn>]
 [-MonitoringContext <Boolean>]
 [-OutputObjects]
 [-TransientEventSuppressionWindow <UInt32>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (9)

ParameterTypeRequiredWhat it controls
-Identity ServerIdParameter The Identity parameter specifies the Mailbox server that you want to test. You can use any value that uniquely identifies the server. For example:
-ActiveDirectoryTimeout Int32 The ActiveDirectoryTimeout parameter specifies the time interval in seconds that's allowed for each directory service operation before the operation times out. The default value is 15 seconds.
-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.
-DatabaseAvailabilityGroup DatabaseAvailabilityGroupIdParameter The DatabaseAvailabilityGroup parameter specifies whether to test all servers in the specified DAG. You can use any value that uniquely identifies the DAG. For example:
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-MonitoringContext Boolean The MonitoringContext parameter specifies whether to include the associated monitoring events and performance counters in the results. Valid values are:
-OutputObjects SwitchParameter The OutputObjects switch specifies whether to output an array of information regarding failures. You don't need to specify a value with this switch.
-TransientEventSuppressionWindow UInt32 The TransientEventSuppressionWindow parameter specifies the number of minutes that the queue lengths can be exceeded before the queue length tests are considered to have failed. This parameter is used to reduce the...
-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.