Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AddByCName method of the PS_DnsServerResourceRecord class

Adds a type CNAME resource record to a DNS server.

Syntax


uint32 AddByCName(
  [in]   string HostNameAlias,
  [in]   string ZoneName,
  [in]   datetime TimeToLive,
  [in]   boolean AllowUpdateAny,
  [in]   string Name,
  [in]   string ComputerName,
  [in]   string RRType,
  [in]   boolean AgeRecord,
  [in]   boolean PassThru,
  [in]   string ZoneScope,
  [out]  string cmdletOutput
);

Parameters

HostNameAlias [in]

Specifies the FQDN of the host to be aliased. This is the canonical name of the host.

ZoneName [in]

Specifies the name of a DNS zone.

TimeToLive [in]

Specifies the Time to Live (TTL) value, in seconds, for a resource record. Other DNS servers use this length of time to determine how long to cache a record.

AllowUpdateAny [in]

Indicates that any authenticated user can update a resource record that has the same owner name.

Name [in]

Specifies the alias for the CNAME record.

ComputerName [in]

Specifies a DNS server. If you do not specify this parameter, the command runs on the local system. You can specify an IP address or any value that resolves to an IP address, such as a fully qualified domain name (FQDN), host name, or NETBIOS name.

RRType [in]

{HINFO | AFSDB | ATMA | ISDN | MD | MG | MINFO | MR | MX | |RP | RT | WKS | X25| A | AAAA |CNAME | PTR |SRV |TXT |WINS | WINSR| NS | SOA | DNAME | DHCID}

ValueMeaning
A
A

(Indicates that the record that this method adds to the DNS server is a host address (A) resource record. An A resource record maps a host name to an IPv4 address.)

Ns
Ns

(Indicates that the record that this method adds to the DNS server is a Name Server (NS) resource record on a DNS server.)

CName
CName

(Indicates that the record that this method adds to the DNS server is a canonical name (CNAME) resource record.)

Wks
Wks

(Indicates that the record that this method adds to the DNS server is WKS resource record.)

Ptr
Ptr

(Indicates that the record that this method adds to the DNS server is a PTR resource record.)

HInfo
HInfo

(Indicates that the record that this method adds to the DNS server is a host information (HINFO) resource record on a DNS server.)

Mx
Mx

(Indicates that the record that this method adds to the DNS server is a mail exchanger (MX) resource record.)

Txt
Txt

(Indicates that the record that this method adds to the DNS server is a TXT resource record.)

Rp
Rp

(Indicates that the record that this method adds to the DNS server is a Responsible Person (RP) resource record.)

Afsdb
Afsdb

(Indicates that the record that this method adds to the DNS server is an Andrew File System cell database server (AFSDB) resource record. An AFSDB resource record gives the location of the AFS cell database server and uses DNS to map a DNS domain name to the name of an AFS cell database server.)

X25
X25

(Indicates that the record that this method adds to the DNS server is an X25 resource record.)

Isdn
Isdn

(Indicates that the record that this method adds to the DNS server is an Integrated Services Digital Network (ISDN) resource record.)

Rt
Rt

(Indicates that the record that this method adds to the DNS server is a Route Through (RT) resource record.)

AAAA
AAAA

(Indicates that the record that this method adds to the DNS server is an AAAA resource record. An AAAA resource record maps a host name to an IPv6 address.)

Srv
Srv

(Indicates that the record that this method adds to the DNS server is a Service (SRV) resource record.)

Atma
Atma

(Indicates that the record that this method adds to the DNS server is an ATM address resource record.)

DName
DName

(Indicates that the record that this method adds to the DNS server is a domain alias (DNAME) resource record on a DNS server. A DNAME resource record renames the root and all descendants in a domain namespace subtree and provides nonterminal domain name redirection.)

Ds
Ds

(Ds)

Rrsig
Rrsig

(Rrsig)

Nsec
Nsec

(Nsec)

DnsKey
DnsKey

(DnsKey)

DhcId
DhcId

(Indicates that the record that this method adds to the DNS server is a Dynamic Host Configuration Protocol Information (DHCID) resource record.s)

Wins
Wins

(Indicates that the record that this method adds to the DNS server is a WINS resource record.)

WinsR
WinsR

(Indicates that the record that this method adds to the DNS server is a WINS reverse (WinsR) resource record.)

 

AgeRecord [in]

Indicates that the DNS server uses a time stamp for the resource record that this method adds. A DNS server can scavenge resource records that have become stale based on a time stamp.

PassThru [in]

true to return the object that was modified by the method. By default, this method does not generate any output.

ZoneScope [in]

Name of the zone scope.

Windows Server 2012:  This experimental parameter is supported beginning with Windows Server 2012 R2.

cmdletOutput [out]

Receives an embedded instance of the DnsServerResourceRecord class.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2012

Namespace

\root\Microsoft\Windows\Dns

MOF

DnsServerPSProvider.mof

DLL

DnsServerPSProvider.dll

See also

PS_DnsServerResourceRecord

 

 

Community Additions

Show:
© 2014 Microsoft