AddByA method of the PS_DnsServerResourceRecord class

Adds a host address (A) resource record resource to a DNS server.


uint32 AddByA(
  [in]  boolean                 CreatePtr,
  [in]  string                  IPv4Address,
  [in]  string                  ZoneName,
  [in]  string                  Name,
  [in]  datetime                TimeToLive,
  [in]  boolean                 AgeRecord,
  [in]  boolean                 AllowUpdateAny,
  [in]  boolean                 A,
  [in]  string                  ComputerName,
  [in]  boolean                 PassThru,
  [in]  string                  ZoneScope,
  [out] DnsServerResourceRecord cmdletOutput


CreatePtr [in]

Indicates that the DNS server automatically creates an associated pointer (PTR) resource record for an A record. A PTR resource record maps an IP address to an FQDN.

IPv4Address [in]

The IPv4 address of a host.

ZoneName [in]

The name of the DNS zone.

Name [in]

The host name.

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.

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.

AllowUpdateAny [in]

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

A [in]

If specified, creates a DNS Server Resource Record A.

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.

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:  Not supported.

cmdletOutput [out]

Receives an embedded instance of the DnsServerResourceRecord class.


Minimum supported client

None supported

Minimum supported server

Windows Server 2012







See also