en-US/about_DnsRecordA.help.txt

.NAME
    DnsRecordA
 
.SYNOPSIS
    The DnsRecordA DSC resource manages A DNS records against a specific zone on a Domain Name System (DNS) server.
 
.DESCRIPTION
    The DnsRecordA DSC resource manages A DNS records against a specific zone on a Domain Name System (DNS) server.
 
.PARAMETER Name
    Key - System.String
    Specifies the name of a DNS server resource record object. (Key Parameter)
 
.PARAMETER IPv4Address
    Key - System.String
    Specifies the IPv4 address of a host. (Key Parameter)
 
.EXAMPLE 1
 
This configuration will ensure a DNS A record exists when only the mandatory properties are specified.
 
Configuration DnsRecordA_Mandatory_config
{
    Import-DscResource -ModuleName 'xDnsServer'
 
    Node localhost
    {
        DnsRecordA 'TestRecord'
        {
            ZoneName = 'contoso.com'
            Name = 'www'
            IPv4Address = '192.168.50.10'
            Ensure = 'Present'
        }
    }
}
 
.EXAMPLE 2
 
This configuration will ensure a DNS A record exists when all properties are specified.
 
Configuration DnsRecordA_Full_config
{
    Import-DscResource -ModuleName 'xDnsServer'
 
    Node localhost
    {
        DnsRecordA 'TestRecord'
        {
            ZoneName = 'contoso.com'
            Name = 'www'
            IPv4Address = '192.168.50.10'
            TimeToLive = '01:00:00'
            DnsServer = 'localhost'
            Ensure = 'Present'
        }
    }
}
 
.EXAMPLE 3
 
This configuration will ensure a DNS A record does not exist when mandatory properties are specified.
 
Note that not all mandatory properties are necessarily key properties. Non-key property values will be ignored when determining whether the record is to be removed.
 
Configuration DnsRecordA_Remove_config
{
    Import-DscResource -ModuleName 'xDnsServer'
 
    Node localhost
    {
        DnsRecordA 'TestRecord'
        {
            ZoneName = 'contoso.com'
            Name = 'www'
            IPv4Address = '192.168.50.10'
            Ensure = 'Absent'
        }
    }
}