Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Related Help Topics
No resources found.
Related Blog Articles
No resources found.
Expand Minimize


Exchange 2010

Applies to: Exchange Server 2010 SP2, Exchange Server 2010 SP3

Topic Last Modified: 2015-03-09

Use the Test-SmtpConnectivity cmdlet to 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.

Test-SmtpConnectivity [-Identity <ServerIdParameter>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-MonitoringContext <$true | $false>] [-WhatIf [<SwitchParameter>]]

When you run the Test-SmtpConnectivity cmdlet against a Hub Transport server, the cmdlet attempts to establish an SMTP connection to all bindings of all Receive connectors hosted on that server. For each attempt, the cmdlet returns the following information:

  • Server   The name of the server that hosts the Receive connector.

  • ReceiveConnector   The name of the Receive connector to which the SMTP connection was attempted.

  • Binding   The binding that was configured on the Receive connector.

  • EndPoint   The actual IP address and port to which the SMTP connection was attempted.

  • StatusCode   The result of the connection attempt. This can be one of the following: Success, Unable to connect, Transient error, Permanent error, External error.

  • Details   The actual response received from the server being tested. If the connection attempt isn't successful, this field contains an error string.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Testing mail flow" entry in the Transport Permissions topic.


Parameter Required Type Description




The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.




The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory. The DomainController parameter isn't supported on the Edge Transport server role. The Edge Transport server role reads only from the Active Directory Lightweight Directory Services (AD LDS) instance.




The Identity parameter specifies the transport server for which the cmdlet verifies SMTP connectivity. The cmdlet verifies SMTP connectivity for all Receive connectors hosted on the specified server. If no server is specified, the cmdlet attempts to perform the SMTP connectivity test against all Receive connectors on the local server. If the local server isn't a Hub Transport or Edge Transport server, the cmdlet returns the error: "Server <servername> is not a Transport server".




The MonitoringContext parameter specifies whether the results of the test are written to the monitoring event log using the monitoring infrastructure. If you set this parameter to $true, the cmdlet generates events for the monitoring infrastructure. If you set this parameter to $false, the cmdlet only displays the results in the Exchange Management Shell.

The default value is $false.




The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.


Error Description


This example verifies SMTP connectivity for all Receive connectors on server Hub01.

Test-SmtpConnectivity -Identity Hub01

This example verifies SMTP connectivity for all Receive connectors on all Hub Transport servers in the organization.

Get-TransportServer | Test-SmtpConnectivity
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft