Commands › Exchange Online
Test-ImapConnectivity
Verify that connectivity to the Microsoft Exchange IMAP4 service is working as expected. **Note**: This cmdlet works best in Exchange 2010. In later versions of Exchange, the functionality of this cmdlet is replaced by Managed Availability. For the best results, use the Invoke-MonitoringProbe cmdlet and specify the relevant active monitor probe instead of using this cmdlet.
Quick start script
# Test-ImapConnectivity — 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-ImapConnectivity | Format-List
# 3. Export for evidence / drift tracking
Test-ImapConnectivity | Export-Clixml .\ImapConnectivity-$(Get-Date -Format yyyyMMdd).xml
Syntax
Test-ImapConnectivity [[-ClientAccessServer] <ServerIdParameter>]
[-Confirm]
[-ConnectionType <ProtocolConnectionType>]
[-DomainController <Fqdn>]
[-LightMode]
[-MailboxCredential <PSCredential>]
[-MailboxServer <ServerIdParameter>]
[-MonitoringContext]
[-PerConnectionTimeout <Int32>]
[-PortClientAccessServer <Int32>]
[-ResetTestAccountCredentials]
[-Timeout <UInt32>]
[-TrustAnySSLCertificate]
[-WhatIf]
[<CommonParameters>]
Parameters (14)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.