Edit

Share via


Set-OutboundConnector

This cmdlet is available only in the cloud-based service.

Use the Set-OutboundConnector cmdlet to modify an existing Outbound connector in your cloud-based organization.

For information about the parameter sets in the Syntax section below, see Exchange cmdlet syntax.

Syntax

Default (Default)

Set-OutboundConnector
    [-Identity] <OutboundConnectorIdParameter>
    [-AllAcceptedDomains <Boolean>]
    [-CloudServicesMailEnabled <Boolean>]
    [-Comment <String>]
    [-Confirm]
    [-ConnectorSource <TenantConnectorSource>]
    [-ConnectorType <TenantConnectorType>]
    [-Enabled <Boolean>]
    [-IsTransportRuleScoped <Boolean>]
    [-IsValidated <Boolean>]
    [-LastValidationTimestamp <DateTime>]
    [-Name <String>]
    [-RecipientDomains <MultiValuedProperty>]
    [-RouteAllMessagesViaOnPremises <Boolean>]
    [-SenderRewritingEnabled <Boolean>]
    [-SmartHosts <MultiValuedProperty>]
    [-TestMode <Boolean>]
    [-TlsDomain <SmtpDomainWithSubdomains>]
    [-TlsSettings <TlsAuthLevel>]
    [-UseMXRecord <Boolean>]
    [-ValidationRecipients <String[]>]
    [-WhatIf]
    [<CommonParameters>]

Description

Outbound connectors send email messages to remote domains that require specific configuration options.

You need to be assigned permissions before you can run this cmdlet. Although this article lists all parameters for the cmdlet, you might not have access to some parameters if they aren't included in the permissions assigned to you. To find the permissions required to run any cmdlet or parameter in your organization, see Find the permissions required to run any Exchange cmdlet.

Examples

Example 1

Set-OutboundConnector "Contoso Outbound Connector" -UseMxRecord $false -SmartHosts 192.168.0.1

This example changes the settings of the existing Outbound connector named Contoso Outbound Connector to route to a smart host at IP address 192.168.0.1.

Parameters

-AllAcceptedDomains

Applicable: Exchange Online, Exchange Online Protection

The AllAcceptedDomains parameter specifies whether the Outbound connector is used in hybrid organizations where message recipients are in accepted domains of the cloud-based organization. Valid values are:

  • $true: The Outbound connector is used in hybrid organizations when message recipients are in an accepted domain of the cloud-based organization. This setting requires OnPremises for the ConnectorType value.
  • $false: The Outbound connector isn't used in hybrid organizations. This value is the default.

This parameter is effective only for OnPremises connectors.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CloudServicesMailEnabled

Applicable: Exchange Online, Exchange Online Protection

Note: We recommend that you don't use this parameter unless you are directed to do so by Microsoft Customer Service and Support, or by specific product documentation. Instead, use the Hybrid Configuration wizard to configure mail flow between your on-premises and cloud organizations. For more information, see Hybrid Configuration wizard.

The CloudServicesMailEnabled parameter specifies whether the connector is used for hybrid mail flow between an on-premises Exchange environment and Microsoft 365. Specifically, this parameter controls how certain internal X-MS-Exchange-Organization-* message headers are handled in messages that are sent between accepted domains in the on-premises and cloud organizations. These headers are collectively known as cross-premises headers.

Valid values are:

  • $true: The connector is used for mail flow in hybrid organizations, so cross-premises headers are preserved or promoted in messages that flow through the connector. This value is the default for connectors that are created by the Hybrid Configuration wizard. Certain X-MS-Exchange-Organization-* headers in outbound messages that are sent from one side of the hybrid organization to the other are converted to X-MS-Exchange-CrossPremises-* headers and are thereby preserved in messages. X-MS-Exchange-CrossPremises-* headers in inbound messages that are received on one side of the hybrid organization from the other are promoted to X-MS-Exchange-Organization-* headers. These promoted headers replace any instances of the same X-MS-Exchange-Organization-* headers that already exist in messages.
  • $false: The connector isn't used for mail flow in hybrid organizations, so any cross-premises headers are removed from messages that flow through the connector.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Comment

Applicable: Exchange Online, Exchange Online Protection

The Comment parameter specifies an optional comment. If you specify a value that contains spaces, enclose the value in quotation marks ("), for example: "This is an admin note".

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Applicable: Exchange Online, Exchange Online Protection

The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on if the cmdlet requires confirmation before proceeding.

  • Destructive cmdlets (for example, Remove-* cmdlets) have a built-in pause that forces you to acknowledge the command before proceeding. For these cmdlets, you can skip the confirmation prompt by using this exact syntax: -Confirm:$false.
  • Most other cmdlets (for example, New-* and Set-* cmdlets) don't have a built-in pause. For these cmdlets, specifying the Confirm switch without a value introduces a pause that forces you acknowledge the command before proceeding.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConnectorSource

Applicable: Exchange Online, Exchange Online Protection

The ConnectorSource parameter specifies how the connector is created. Valid values are:

  • Default: The connector is manually created. This value is the default for manually created connectors, and we recommend that you don't change this value.
  • HybridWizard: The connector is automatically created by the Hybrid Configuration Wizard.
  • Migrated: The connector was originally created in Microsoft Forefront Online Protection for Exchange.

Parameter properties

Type:TenantConnectorSource
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ConnectorType

Applicable: Exchange Online, Exchange Online Protection

The ConnectorType parameter specifies a category for the domains that are serviced by the connector. Valid values are:

  • Partner: The connector services domains that are external to your organization.
  • OnPremises: The connector services domains that are used by your on-premises organization.

Parameter properties

Type:TenantConnectorType
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Enabled

Applicable: Exchange Online, Exchange Online Protection

The Enabled parameter specifies whether to enable or disable the Outbound connector. Valid values are:

  • $true: The connector is enabled. This value is the default.
  • $false: The connector is disabled.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Identity

Applicable: Exchange Online, Exchange Online Protection

The Identity parameter specifies the connector you want to modify. You can use any value that uniquely identifies the connector. For example:

  • Name
  • Distinguished name (DN)
  • GUID

Parameter properties

Type:OutboundConnectorIdParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-IsTransportRuleScoped

Applicable: Exchange Online, Exchange Online Protection

The IsTransportRuleScoped parameter specifies whether the Outbound connector is associated with a transport rule (also known as a mail flow rule). Valid values are:

  • $true: The connector is associated with a transport rule.
  • $false: The connector isn't associated with a transport rule. This value is the default.

You scope a transport rule to an Outbound connector by using the RouteMessageOutboundConnector parameter on the New-TransportRule or Set-TransportRule cmdlets. Messages that match the conditions of the transport rule are routed to their destinations by using the specified Outbound connector.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IsValidated

Applicable: Exchange Online, Exchange Online Protection

The IsValidated parameter specifies whether the Outbound connector is validated. Valid values are:

  • $true: The connector is validated,
  • $false: The connector hasn't been validated. This value is the default.

Use the Validate-OutboundConnector cmdlet to validate the connector.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LastValidationTimestamp

Applicable: Exchange Online, Exchange Online Protection

The LastValidationTimestamp parameter specifies the date/time that the Outbound connector was validated.

To specify a date/time value for this parameter, use either of the following options:

  • Specify the date/time value in UTC: For example, "2021-05-06 14:30:00z".
  • Specify the date/time value as a formula that converts the date/time in your local time zone to UTC: For example, (Get-Date "5/6/2021 9:30 AM").ToUniversalTime(). For more information, see Get-Date.

Use the Validate-OutboundConnector cmdlet to validate the connector.

Parameter properties

Type:DateTime
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Applicable: Exchange Online, Exchange Online Protection

The Name parameter specifies the unique name for the connector. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks (").

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RecipientDomains

Applicable: Exchange Online, Exchange Online Protection

The RecipientDomains parameter specifies the domain that the Outbound connector routes mail to. You can specify multiple domains separated by commas.

You can use a wildcard character to specify all subdomains of a specified domain, as shown in the following example: *.contoso.com. However, you can't embed a wildcard character, as shown in the following example: domain.*.contoso.com.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RouteAllMessagesViaOnPremises

Applicable: Exchange Online, Exchange Online Protection

The RouteAllMessagesViaOnPremises parameter specifies that all messages serviced by this connector are first routed through the on-premises email system. Valid values are:

  • $true: Messages are routed through the on-premises email system. This setting requires OnPremises for the ConnectorType value.
  • $false: Messages aren't routed through the on-premises email system. This value is the default.

This parameter is effective only for OnPremises connectors.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SenderRewritingEnabled

Applicable: Exchange Online, Exchange Online Protection

The SenderRewritingEnabled parameter specifies that all messages that normally qualify for SRS rewriting are rewritten for routing through the on-premises email system. Valid values are:

  • $true: Messages are rewritten by SRS as needed before being routed through the on-premises email system. This setting requires OnPremises for the ConnectorType value.
  • $false: Messages aren't rewritten by SRS before being routed through the on-premises email system. This value is the default.

This parameter is effective only for OnPremises connectors.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SmartHosts

Applicable: Exchange Online, Exchange Online Protection

The SmartHosts parameter specifies the smart host that the Outbound connector uses to route mail. Valid values are:

  • FQDN of a smart host server, a mail exchange (MX) record, or an address (A) record: For example, mail.contoso.com.
  • Single IP address: For example, 10.10.1.1.
  • Classless InterDomain Routing (CIDR) IP address range: For example, 192.168.0.1/25.

You can specify multiple value separated by commas: "Value1","Value2",..."ValueN".

This parameter is required if you use the value $false for the UseMxRecord parameter.

Parameter properties

Type:MultiValuedProperty
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TestMode

Applicable: Exchange Online, Exchange Online Protection

The TestMode parameter specifies whether you want to enabled or disable test mode for the Outbound connector. Valid values are:

  • $true: Test mode is enabled.
  • $false: Test mode is disabled. This value is the default.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TlsDomain

Applicable: Exchange Online, Exchange Online Protection

The TlsDomain parameter specifies the domain name that the Outbound connector uses to verify the FQDN of the target certificate when establishing a TLS secured connection. A valid value for this parameter is an SMTP domain.

Wildcards are supported to specify all subdomains of a domain (for example, *.contoso.com), but you can't embed the wildcard character within the domain (for example, domain.*.contoso.com).

This parameter meaningful only when the TlsSettings value is DomainValidation.

Parameter properties

Type:SmtpDomainWithSubdomains
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TlsSettings

Applicable: Exchange Online, Exchange Online Protection

The TlsSettings parameter specifies the TLS authentication level that's used for outbound TLS connections established by this Outbound connector. Valid values are:

  • EncryptionOnly: TLS is used only to encrypt the communication channel. No certificate authentication is performed.
  • CertificateValidation: TLS is used to encrypt the channel and certificate chain validation and revocation lists checks are performed.
  • DomainValidation: In addition to channel encryption and certificate validation, the Outbound connector also verifies that the FQDN of the target certificate matches the domain specified in the TlsDomain parameter.
  • $null (blank): This value is the default.

Parameter properties

Type:TlsAuthLevel
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-UseMXRecord

Applicable: Exchange Online, Exchange Online Protection

The UseMXRecord parameter enables or disables DNS routing for the connector. Valid values are:

  • $true: The connector uses DNS routing (MX records in DNS) to deliver email. This value is the default.
  • $false: The connector delivers email to one or more smart hosts. This setting requires one or more smart hosts for the SmartHosts value.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ValidationRecipients

Applicable: Exchange Online, Exchange Online Protection

The ValidationRecipients parameter specifies the email addresses of the validation recipients for the Outbound connector. You can specify multiple email addresses separated by commas.

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Applicable: Exchange Online, Exchange Online Protection

The WhatIf switch simulates the actions of the command. You can use this switch to view the changes that would occur without actually applying those changes. You don't need to specify a value with this switch.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

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.

Outputs

Output 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.