en-US/about_DnsRecordCname.help.txt
.NAME
DnsRecordCname .SYNOPSIS The DnsRecordCname DSC resource manages CNAME DNS records against a specific zone on a Domain Name System (DNS) server. .DESCRIPTION The DnsRecordCname DSC resource manages CNAME 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 HostNameAlias Key - System.String Specifies a a canonical name target for a CNAME record. This must be a fully qualified domain name (FQDN). (Key Parameter) .EXAMPLE 1 This configuration will ensure a DNS CNAME record exists when only the mandatory properties are specified. Configuration DnsRecordCname_Mandatory_config { Import-DscResource -ModuleName 'DnsServerDsc' Node localhost { DnsRecordCname 'TestRecord' { ZoneName = 'contoso.com' Name = 'bar' HostNameAlias = 'quarks.contoso.com' Ensure = 'Present' } } } .EXAMPLE 2 This configuration will ensure a DNS CNAME record exists when all properties are specified. Configuration DnsRecordCname_Full_config { Import-DscResource -ModuleName 'DnsServerDsc' Node localhost { DnsRecordCname 'TestRecord' { ZoneName = 'contoso.com' Name = 'bar' HostNameAlias = 'quarks.contoso.com' TimeToLive = '01:00:00' DnsServer = 'localhost' Ensure = 'Present' } } } .EXAMPLE 3 This configuration will ensure a DNS CNAME record does not exist when mandatory properties are specified. Configuration DnsRecordCname_Remove_config { Import-DscResource -ModuleName 'DnsServerDsc' Node localhost { DnsRecordCname 'TestRecord' { ZoneName = 'contoso.com' Name = 'bar' HostNameAlias = 'quarks.contoso.com' Ensure = 'Absent' } } } |