Commands › Exchange Online

Set-OutboundConnector

Exchange Online ExchangeOnlineManagement Set-*

Modify an existing Outbound connector in your cloud-based organization.

Quick start script

# Set-OutboundConnector — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-OutboundConnector
$before | Format-List

# 3. Make the change (dry run first)
Set-OutboundConnector -Identity <OutboundConnectorIdParameter> -WhatIf
Set-OutboundConnector -Identity <OutboundConnectorIdParameter>

# 4. Verify and diff
$after = Get-OutboundConnector
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

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

Parameters (24)

ParameterTypeRequiredWhat it controls
-Identity OutboundConnectorIdParameter yes The Identity parameter specifies the connector you want to modify. You can use any value that uniquely identifies the connector. For example:
-AllAcceptedDomains Boolean 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:
-CloudServicesMailEnabled Boolean **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...
-Comment String 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".
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-ConnectorSource TenantConnectorSource The ConnectorSource parameter specifies how the connector is created. Valid values are:
-ConnectorType TenantConnectorType The ConnectorType parameter specifies a category for the domains that are serviced by the connector. Valid values are:
-Enabled Boolean The Enabled parameter specifies whether to enable or disable the Outbound connector. Valid values are:
-IsTransportRuleScoped Boolean The IsTransportRuleScoped parameter specifies whether the Outbound connector is associated with a transport rule (also known as a mail flow rule). Valid values are:
-IsValidated Boolean The IsValidated parameter specifies whether the Outbound connector is validated. Valid values are:
-LastValidationTimestamp DateTime The LastValidationTimestamp parameter specifies the date/time that the Outbound connector was validated.
-MtaStsMode MtaStsMode The MtaStsMode parameter provides admin control over outbound MTA Strict Transport Security (MTA-STS) validation for email sent over the outbound connector. Organizations can choose how strictly to enforce MTA-STS...
-Name String 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 (").
-RecipientDomains MultiValuedProperty The RecipientDomains parameter specifies the domain that the Outbound connector routes mail to. You can specify multiple domains separated by commas.
-RouteAllMessagesViaOnPremises Boolean The RouteAllMessagesViaOnPremises parameter specifies that all messages serviced by this connector are first routed through the on-premises email system. Valid values are:
-SenderRewritingEnabled Boolean 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:
-SmartHosts MultiValuedProperty The SmartHosts parameter specifies the smart host that the Outbound connector uses to route mail. Valid values are:
-SmtpDaneMode SmtpDaneMode The SmtpDaneMode parameter provides admin control over outbound SMTP DNS-based Authentication of Named Entities (DANE) validation for email sent over the outbound connector. Organizations can choose how strictly to...
-TestMode Boolean The TestMode parameter specifies whether you want to enabled or disable test mode for the Outbound connector. Valid values are:
-TlsDomain SmtpDomainWithSubdomains 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.
-TlsSettings TlsAuthLevel The TlsSettings parameter specifies the TLS authentication level that's used for outbound TLS connections established by this Outbound connector. Valid values are:
-UseMXRecord Boolean The UseMXRecord parameter enables or disables DNS routing for the connector. Valid values are:
-ValidationRecipients String[] The ValidationRecipients parameter specifies the email addresses of the validation recipients for the Outbound connector. You can specify multiple email addresses separated by commas.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.