en-US/about_DnsRecordMxScoped.help.txt

.NAME
    DnsRecordMxScoped
 
.SYNOPSIS
    The DnsRecordMxScoped DSC resource manages MX DNS records against a specific zone and zone scope on a Domain Name System (DNS) server.
 
.DESCRIPTION
    The DnsRecordMxScoped DSC resource manages MX DNS records against a specific zone and zone scope on a Domain Name System (DNS) server.
 
.PARAMETER ZoneScope
    Key - System.String
    Specifies the name of a zone scope. (Key Parameter)
 
.EXAMPLE 1
 
This configuration will ensure a DNS MX record exists when only the mandatory properties are specified.
 
Configuration DnsRecordMxScoped_Mandatory_config
{
    Import-DscResource -ModuleName 'DnsServerDsc'
 
    Node localhost
    {
        DnsRecordMxScoped 'TestRecord'
        {
            ZoneName = 'contoso.com'
            ZoneScope = 'external'
            EmailDomain = 'contoso.com'
            MailExchange = 'mailserver1.contoso.com'
            Priority = 20
            Ensure = 'Present'
        }
    }
}
 
.EXAMPLE 2
 
This configuration will ensure a DNS MX record exists when all properties are specified.
 
Configuration DnsRecordMxScoped_Full_config
{
    Import-DscResource -ModuleName 'DnsServerDsc'
 
    Node localhost
    {
        DnsRecordMxScoped 'TestRecord'
        {
            ZoneName = 'contoso.com'
            ZoneScope = 'external'
            EmailDomain = 'contoso.com'
            MailExchange = 'mailserver1.contoso.com'
            Priority = 20
            TimeToLive = '01:00:00'
            DnsServer = 'localhost'
            Ensure = 'Present'
        }
    }
}
 
.EXAMPLE 3
 
This configuration will ensure a DNS MX record does not exist when mandatory properties are specified.
 
Note that the 'Priority' property value will be ignored when determining whether the record is to be removed.
 
Configuration DnsRecordMxScoped_Remove_config
{
    Import-DscResource -ModuleName 'DnsServerDsc'
 
    Node localhost
    {
        DnsRecordMxScoped 'TestRecord'
        {
            ZoneName = 'contoso.com'
            ZoneScope = 'external'
            EmailDomain = 'contoso.com'
            MailExchange = 'mailserver1.contoso.com'
            Priority = 20
            Ensure = 'Absent'
        }
    }
}