Commands › Exchange Online

Test-MigrationServerAvailability

Exchange Online ExchangeOnlineManagement Test-*

Test the availability of the target server in preparation to perform cross-forest mailbox moves, migration of on-premises mailboxes to Exchange Online, or to migrate on-premises mailbox data from an IMAP server to Exchange Online mailboxes. For all migration types, the cmdlet attempts to verify the connection settings used to connect to the target server.

Quick start script

# Test-MigrationServerAvailability — 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-MigrationServerAvailability -Autodiscover <SwitchParameter> -Compliance <SwitchParameter> -Credentials <PSCredential> | Format-List

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

Syntax — 13 parameter sets

ExchangeRemoteMoveAutodiscover

Test-MigrationServerAvailability -Credentials <PSCredential> -EmailAddress <SmtpAddress> [-Autodiscover] [-ExchangeRemoteMove]
 [-Confirm]
 [-Partition <MailboxIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

ExchangeOutlookAnywhereAutodiscover

Test-MigrationServerAvailability -Credentials <PSCredential> -EmailAddress <SmtpAddress> [-Autodiscover] [-ExchangeOutlookAnywhere]
 [-AcceptUntrustedCertificates]
 [-Confirm]
 [-MailboxPermission <MigrationMailboxPermission>]
 [-Partition <MailboxIdParameter>]
 [-SourceMailboxLegacyDN <String>]
 [-TestMailbox <MailboxIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

PSTImport

Test-MigrationServerAvailability -Credentials <PSCredential> -RemoteServer <Fqdn> [-FilePath <String>] [-PSTImport]
 [-Confirm]
 [-Partition <MailboxIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

ExchangeOutlookAnywhere

Test-MigrationServerAvailability -Credentials <PSCredential> -ExchangeServer <String> -RPCProxyServer <Fqdn> [-ExchangeOutlookAnywhere]
 [-AcceptUntrustedCertificates]
 [-Authentication <AuthenticationMethod>]
 [-EmailAddress <SmtpAddress>]
 [-MailboxPermission <MigrationMailboxPermission>]
 [-TestMailbox <MailboxIdParameter>]
 [-SourceMailboxLegacyDN <String>]
 [-Confirm]
 [-Partition <MailboxIdParameter>]
 [-WhatIf]
 [<CommonParameters>]

9 more parameter sets — see the parameter table below.

Parameters (28)

ParameterTypeRequiredWhat it controls
-Autodiscover SwitchParameter yes The Autodiscover switch specifies that the command should use the Autodiscover service to obtain the connection settings for the target server. You don't need to specify a value with this switch.
-Compliance SwitchParameter yes The Compliance switch specifies that the endpoint type is compliance. You don't need to specify a value with this switch.
-Credentials PSCredential yes The Credentials parameter specifies the username and password for an account that can access mailboxes on the target server. Specify the username in the domain\\username format or the user principal name (UPN) format...
-EmailAddress SmtpAddress yes The EmailAddress parameter specifies the email address of an administrator account that can access the remote server. This parameter is required when you use the Autodiscover parameter.
-Endpoint MigrationEndpointIdParameter yes The Endpoint parameter specifies the name of the migration endpoint to connect to. A migration endpoint contains the connection settings and other migration configuration settings. If you include this parameter, the...
-ExchangeOutlookAnywhere SwitchParameter yes This parameter is available only in the cloud-based service.
-ExchangeRemoteMove SwitchParameter yes The ExchangeRemoteMove switch specifies a migration type where mailboxes are moved with full fidelity between two on-premises forests or between an on-premises forest and Exchange Online. You don't need to specify a...
-ExchangeServer String yes This parameter is available only in the cloud-based service.
-Imap SwitchParameter yes This parameter is available only in the cloud-based service.
-Gmail SwitchParameter yes This parameter is available only in the cloud-based service.
-Port Int32 yes This parameter is available only in the cloud-based service.
-PSTImport SwitchParameter yes This parameter is available only in on-premises Exchange.
-PublicFolder SwitchParameter yes This parameter is available only in the cloud-based service.
-PublicFolderDatabaseServerLegacyDN String yes This parameter is available only in the cloud-based service.
-PublicFolderToUnifiedGroup SwitchParameter yes The PublicFolderToUnifiedGroup switch specifies that the endpoint type is public folders to Microsoft 365 Groups. You don't need to specify a value with this switch.
-RemoteServer Fqdn yes The RemoteServer parameter specifies the FQDN of the on-premises mail server. This parameter is required when you want to perform one of the following migration types:
-RPCProxyServer Fqdn yes This parameter is available only in the cloud-based service.
-ServiceAccountKeyFileData Byte[] yes This parameter is available only in the cloud-based service.
-SourceMailboxLegacyDN String yes This parameter is available only in the cloud-based service.
-AcceptUntrustedCertificates SwitchParameter This parameter is available only in the cloud-based service.
-Authentication AuthenticationMethod This parameter is available only in the cloud-based service.
-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.
-FilePath String The FilePath parameter specifies the path containing the PST files when testing a PST Import migration endpoint.
-MailboxPermission MigrationMailboxPermission This parameter is available only in the cloud-based service.
-Partition MailboxIdParameter This parameter is available only in the cloud-based service.
-Security IMAPSecurityMechanism This parameter is available only in the cloud-based service.
-TestMailbox MailboxIdParameter 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.