Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2
Topic Last Modified: 2011-05-08
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 [-Identity
<ServerIdParameter>] [-Confirm [<SwitchParameter>]]
[-DomainController <Fqdn>] [-MonitoringContext <$true |
$false>] [-WhatIf [<SwitchParameter>]]
|
Detailed Description
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.
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. 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. |
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. 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". |
MonitoringContext |
Optional |
System.Boolean |
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
The default value is |
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.
Errors
Error | Description |
---|---|
|
Examples
EXAMPLE 1
This example verifies SMTP connectivity for all Receive connectors on server Hub01.
Copy Code | |
---|---|
Test-SmtpConnectivity -Identity Hub01 |
EXAMPLE 2
This example verifies SMTP connectivity for all Receive connectors on all Hub Transport servers in the organization.
Copy Code | |
---|---|
Get-TransportServer | Test-SmtpConnectivity |