EXORemoteDomain

Parameters

Parameter Attribute DataType Description Allowed Values
Identity Key String Specify the Identity for the RemoteDomain.
DomainName Write String The DomainName parameter specifies the SMTP domain that you want to establish as a remote domain. A valid value is an SMTP domain (for example, contoso.com). The maximum length is 256 characters.
Ensure Write String Specify if the RemoteDomain should exist or not. Present, Absent
AllowedOOFType Write String The AllowedOOFType parameter specifies the type of automatic replies or out-of-office (also known as OOF) notifications than can be sent to recipients in the remote domain. Valid values are: External, ExternalLegacy, InternalLegacy or None External, ExternalLegacy, InternalLegacy, None
AutoForwardEnabled Write Boolean The AutoForwardEnabled parameter specifies whether to allow messages that are auto-forwarded by client email programs in your organization.
AutoReplyEnabled Write Boolean The AutoReplyEnabled parameter specifies whether to allow messages that are automatic replies from client email programs in your organization (for example, automatic reply messages that are generated by rules in Outlook).
ByteEncoderTypeFor7BitCharsets Write String The ByteEncoderTypeFor7BitCharsets parameter specifies the 7-bit transfer encoding method for MIME format for messages sent to this remote domain. Use7Bit, UseQP, UseBase64, UseQPHtmlDetectTextPlain, UseBase64HtmlDetectTextPlain, UseQPHtml7BitTextPlain, UseBase64Html7BitTextPlain, Undefined
CharacterSet Write String The CharacterSet parameter specifies a character set for MIME messages without defined character sets that are sent from your organization to recipients in the remote domain.
ContentType Write String The ContentType parameter specifies the outbound message content type and formatting. MimeHtmlText, MimeText, MimeHtml
DeliveryReportEnabled Write Boolean The DeliveryReportEnabled parameter specifies whether to allow delivery reports from client software in your organization to recipients in the remote domain.
DisplaySenderName Write Boolean The DisplaySenderName parameter specifies whether to show the sender's Display Name in the From email address for messages sent to recipients in the remote domain.
IsInternal Write Boolean The IsInternal parameter specifies whether the recipients in the remote domain are considered to be internal recipients.
LineWrapSize Write String The LineWrapSize parameter specifies the line-wrap size for messages to recipients in the remote domain. Valid values are an integer from 0 through 132 or the value to unlimited. The default value is unlimited.
MeetingForwardNotificationEnabled Write Boolean The MeetingForwardNotificationEnabled parameter specifies whether to enable meeting forward notifications for recipients in the remote domain.
Name Write String The Name parameter specifies a unique name for the remote domain object. The maximum length is 64 characters. If the value contains spaces, enclose the value in quotation marks.
NDREnabled Write Boolean The NDREnabled parameter specifies whether to allow non-delivery reports (also known NDRs or bounce messages) from your organization to recipients in the remote domain.
NonMimeCharacterSet Write String The NonMimeCharacterSet parameter specifies a character set for plain text messages without defined character sets that are sent from your organization to recipients in the remote domain.
PreferredInternetCodePageForShiftJis Write String The PreferredInternetCodePageForShiftJis parameter specifies the specific code page to use for Shift JIS character encoding in messages that are sent to recipients in the remote domain. 50220, 50221, 50222, Undefined
RequiredCharsetCoverage Write SInt32 The RequiredCharsetCoverage parameter specifies a percentage threshold for characters in a message that must match to apply your organization's preferred character set before switching to automatic character set detection.
TargetDeliveryDomain Write Boolean The TargetDeliveryDomain parameter specifies whether the remote domain is used in cross-forest deployments to generate target email addresses for new mail users that represent users in the other organization (for example, all mailboxes hosted on Exchange Online are represented as mail users in your on-premises organization).
TNEFEnabled Write Boolean The TNEFEnabled parameter specifies whether Transport Neutral Encapsulation Format (TNEF) message encoding is used on messages sent to the remote domain.
TrustedMailInboundEnabled Write Boolean The TrustedMailInboundEnabled parameter specifies whether messages from senders in the remote domain are treated as trusted messages.
TrustedMailOutboundEnabled Write Boolean The TrustedMailOutboundEnabled parameter specifies whether messages sent to recipients in the remote domain are treated as trusted messages.
UseSimpleDisplayName Write Boolean The UseSimpleDisplayName parameter specifies whether the sender's simple display name is used for the From email address in messages sent to recipients in the remote domain.
Credential Write PSCredential Credentials of the Exchange Global Admin
ApplicationId Write String Id of the Azure Active Directory application to authenticate with.
TenantId Write String Id of the Azure Active Directory tenant used for authentication.
CertificateThumbprint Write String Thumbprint of the Azure Active Directory application's authentication certificate to use for authentication.
CertificatePassword Write PSCredential Username can be made up to anything but password will be used for CertificatePassword
CertificatePath Write String Path to certificate used in service principal usually a PFX file.
ManagedIdentity Write Boolean Managed ID being used for authentication.
AccessTokens Write StringArray[] Access token used for authentication.

Description

This resource configures the Remote Email Domains in Exchange Online.

Permissions

Exchange

To authenticate with Microsoft Exchange, this resource required the following permissions:

Roles

  • Remote and Accepted Domains, View-Only Configuration

Role Groups

  • Organization Management

Examples

Example 1

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $Credscredential
    )
    Import-DscResource -ModuleName Microsoft365DSC

    node localhost
    {
        EXORemoteDomain 583b0b70-b45d-401f-98a6-0e7fa8434946
        {
            Identity                             = "Integration"
            AllowedOOFType                       = "External"
            AutoForwardEnabled                   = $True
            AutoReplyEnabled                     = $True
            ByteEncoderTypeFor7BitCharsets       = "Undefined"
            CharacterSet                         = "iso-8859-1"
            ContentType                          = "MimeHtmlText"
            DeliveryReportEnabled                = $True
            DisplaySenderName                    = $True
            DomainName                           = "contoso.com"
            IsInternal                           = $False
            LineWrapSize                         = "Unlimited"
            MeetingForwardNotificationEnabled    = $False
            Name                                 = "Integration"
            NonMimeCharacterSet                  = "iso-8859-1"
            PreferredInternetCodePageForShiftJis = "Undefined"
            TargetDeliveryDomain                 = $False
            TrustedMailInboundEnabled            = $False
            TrustedMailOutboundEnabled           = $False
            UseSimpleDisplayName                 = $False
            Ensure                               = "Present"
            Credential                           = $Credscredential
        }
    }
}

Example 2

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $Credscredential
    )
    Import-DscResource -ModuleName Microsoft365DSC

    node localhost
    {
        EXORemoteDomain 583b0b70-b45d-401f-98a6-0e7fa8434946
        {
            Identity                             = "Integration"
            AllowedOOFType                       = "External"
            AutoForwardEnabled                   = $True
            AutoReplyEnabled                     = $False # Updated Property
            ByteEncoderTypeFor7BitCharsets       = "Undefined"
            CharacterSet                         = "iso-8859-1"
            ContentType                          = "MimeHtmlText"
            DeliveryReportEnabled                = $True
            DisplaySenderName                    = $True
            DomainName                           = "contoso.com"
            IsInternal                           = $False
            LineWrapSize                         = "Unlimited"
            MeetingForwardNotificationEnabled    = $False
            Name                                 = "Integration"
            NonMimeCharacterSet                  = "iso-8859-1"
            PreferredInternetCodePageForShiftJis = "Undefined"
            TargetDeliveryDomain                 = $False
            TrustedMailInboundEnabled            = $False
            TrustedMailOutboundEnabled           = $False
            UseSimpleDisplayName                 = $False
            Ensure                               = "Present"
            Credential                           = $Credscredential
        }
    }
}

Example 3

This example is used to test new resources and showcase the usage of new resources being worked on. It is not meant to use as a production baseline.

Configuration Example
{
    param(
        [Parameter(Mandatory = $true)]
        [PSCredential]
        $Credscredential
    )
    Import-DscResource -ModuleName Microsoft365DSC

    node localhost
    {
        EXORemoteDomain 583b0b70-b45d-401f-98a6-0e7fa8434946
        {
            Identity                             = "Integration"
            Ensure                               = "Absent"
            Credential                           = $Credscredential
        }
    }
}