Поделиться через


Add method of the PS_DnsServerResourceRecordA class

Adds type A resource record to a DNS server.

Syntax

uint32 Add(
  [in]  boolean                 AllowUpdateAny,
  [in]  boolean                 CreatePtr,
  [in]  string                  Name,
  [in]  string                  IPv4Address[],
  [in]  string                  ComputerName,
  [in]  datetime                TimeToLive,
  [in]  string                  ZoneName,
  [in]  boolean                 AgeRecord,
  [in]  boolean                 PassThru,
  [in]  string                  ZoneScope,
  [in]  string                  VirtualizationInstance,
  [out] DnsServerResourceRecord cmdletOutput[]
);

Parameters

AllowUpdateAny [in]

true to allow any authenticated user to update the DNS record that has the same owner name; otherwise, false.

CreatePtr [in]

true to create the corresponding PTR record in the reverse lookup zone if that zone exists on the server; otherwise, false.

Name [in]

The host name or the computer name machine assigned to the record.

IPv4Address [in]

An array that contains the IPv4 address of the record.

ComputerName [in]

The local computer syntax, fully qualified domain name, or host name of the DNS server that is associated with the record. If this property is omitted, the local server is used.

TimeToLive [in]

The Time-To-Live (TTL) setting for the resource record. (The default TTL is defined in the SOA resource record). This TTL indicates the length of time used by other DNS servers to determine how long to cache information for the resource record before expiring and discarding it.

ZoneName [in]

The zone that contains the record.

AgeRecord [in]

true if the resource record can be aged and scavenged; otherwise, false. If this parameter is not used, the resource record will remain in the DNS database unless it is manually updated or removed.

PassThru [in]

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

ZoneScope [in]

The name of the zone scope.

Windows Server 2012: Not supported.

VirtualizationInstance [in]

Unique identifier of the virtualization instance.

Windows Server 2012 R2 and Windows Server 2012: This parameter is unavailable prior to Windows Server 2016.

cmdletOutput [out]

An array that receives and embedded instance of the DnsServerResourceRecordA 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_DnsServerResourceRecordA