DnsServerCNameRecords manages CNAME (alias) DNS records on a DNS server.
Use this resource when you need to create DNS alias records that point one hostname to another. CNAME records are commonly used for creating friendly names for services (e.g., mail.contoso.com → exchange01.contoso.com) or for load-balanced endpoints.
Source |
|
DSC Resource |
|
Documentation |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
Hashtable[] |
List of CNAME DNS records |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
Name |
Key |
String |
Specifies the name of a DNS server resource record object. |
|
ZoneName |
Key |
String |
Specifies the name of a DNS zone. |
|
HostNameAlias |
Key |
String |
Specifies a a canonical name target for a CNAME record. This must be a fully qualified domain name (FQDN). |
|
TimeToLive |
String |
Specifies the TimeToLive value of the SRV record. Value must be in valid TimeSpan string format (i.e.: Days.Hours:Minutes:Seconds.Miliseconds or 30.23:59:59.999). |
||
Ensure |
String |
Whether the host record should be present or removed |
|
DnsServerCNameRecords:
Records:
- Name: mailserver1
ZoneName: contoso.com
HostNameAlias: mail.contoso.com
Ensure: PresentDatum.yml (Excerpt)default_lookup_options: MostSpecific
lookup_options:
DnsServerCNameRecords:
merge_hash: deep
DnsServerCNameRecords\Records:
merge_hash_array: UniqueKeyValTuples
merge_options:
tuple_keys:
- Name
- ZoneName
- HostNameAlias