Commands › Exchange Online
Test-SmtpConnectivity
Diagnose whether an SMTP connection can successfully be established to the Receive connectors on a specific server. Although you can run this cmdlet manually to verify SMTP connectivity for a specified server, it's primarily used by Microsoft System Center Operations Manager 2007 to test your transport servers' ability to receive SMTP connections to each of the bindings on all the Receive connectors on those servers.
Quick start script
# Test-SmtpConnectivity — 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-SmtpConnectivity | Format-List
# 3. Export for evidence / drift tracking
Test-SmtpConnectivity | Export-Clixml .\SmtpConnectivity-$(Get-Date -Format yyyyMMdd).xml
Syntax
Test-SmtpConnectivity [[-Identity] <ServerIdParameter>]
[-Confirm]
[-DomainController <Fqdn>]
[-MonitoringContext <Boolean>]
[-WhatIf]
[<CommonParameters>]
Parameters (5)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.