Share via


AddByADForwardLookupZone method of the PS_DnsServerStubZone class

Adds a DNS stub zone.

Syntax

uint32 AddByADForwardLookupZone(
  [in]  boolean           LoadExisting,
  [in]  string            MasterServers[],
  [in]  string            ComputerName,
  [in]  string            ReplicationScope,
  [in]  string            Name,
  [in]  string            DirectoryPartitionName,
  [in]  boolean           PassThru,
  [out] DnsServerStubZone cmdletOutput
);

Parameters

LoadExisting [in]

Loads an existing file for the zone. Otherwise, the method creates default zone records automatically. This switch is relevant only for file-backed zones.

MasterServers [in]

Specifies an array of IP addresses of the master servers of the zone. You can use both IPv4 and IPv6.

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.

ReplicationScope [in]

In case of AD it is below: Specifies the directory partition on which to store the zone. FQDN: Specifies fully qualified domain name of the directory partition. domain: Stores the zone on the domain directory partition. forest: Stores the zone on the enterprise directory partition. legacy: Stores the zone on a legacy directory partition. The Parameter is valid only if it is AD based.

The possible values are.

Forest ("Forest")

(The ForestDnsZone directory partition.)

Domain ("Domain")

(The domain directory partition.)

Legacy ("Legacy")

(A legacy directory partition.)

Custom ("Custom")

A custom directory partition specified in the DirectoryPartitionName parameter.

Name [in]

Specifies the name of the zone.

DirectoryPartitionName [in]

Specifies a directory partition on which to store the zone. Applicable only when the ReplicationScope parameter is set to "Custom".

PassThru [in]

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

cmdletOutput [out]

Receives an embedded instance of the DnsServerStubZone 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_DnsServerStubZone