Applies to: Exchange Server 2013

Topic Last Modified: 2012-09-17

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.

Syntax

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

Examples

EXAMPLE 1

This example verifies SMTP connectivity for all Receive connectors on the Mailbox server named Mailbox01.

Copy Code
Test-SmtpConnectivity Mailbox01

EXAMPLE 2

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

Copy Code
Get-TransportService | Test-SmtpConnectivity

Detailed Description

When you run the Test-SmtpConnectivity cmdlet against a Mailbox 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 values: 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 Mail Flow Permissions topic.

Parameters

Parameter Required Type Description

Confirm

Optional

System.Management.Automation.SwitchParameter

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.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

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.

MonitoringContext

Optional

System.Boolean

The MonitoringContext parameter includes or excludes the associated monitoring events and performance counters in the results. Valid input for this parameter is $true or $false. The default value is $false. If you specify the value $true, the monitoring events and performance counters are included in the command results. Typically, you include the monitoring events and performance counters in the results when the output is passed to Microsoft System Center Operations Manager 2007 or System Center 2012 - Operations Manager.

WhatIf

Optional

System.Management.Automation.SwitchParameter

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.

Input Types

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.

Return Types

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.