Add-DnsServerDirectoryPartition

Add-DnsServerDirectoryPartition

Creates a DNS application directory partition.

Syntax

Parameter Set: Name
Add-DnsServerDirectoryPartition [-Name] <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: BuiltIn
Add-DnsServerDirectoryPartition -Type <String> [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-PassThru] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Add-DnsServerDirectoryPartition cmdlet creates a Domain Name System (DNS) application directory partition. After you install a DNS server, DNS creates an application directory partition for the service at the forest and domain levels. This cmdlet creates additional DNS application directory partitions.

You can store Domain Name System (DNS) zones in the domain or application directory partitions of Active Directory Domain Services (AD DS). A partition is a data structure in AD DS that distinguishes data for different replication purposes. When you create an application directory partition for DNS, you can control the scope of replication for the zone that is stored in that partition.

Parameters

-AsJob

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String>

Specifies a remote DNS server. 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.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Specifies a name for the new DNS application directory partition.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Type<String>

Specifies a type of DNS application directory partition. Valid values are:

-- /Domain
-- /Forest
-- /AllDomains

To create a default domain-wide DNS application directory partition for the Active Directory domain where the specified DNS server is located, specify /Domain.

To create a default forest-wide DNS application directory partition for the Active Directory forest where the specified DNS server is located, specify /Forest.

The ComputerName parameter is ignored for an /AllDomains DNS application directory partition. The computer from where you run this command must be joined to a domain in the forest where you want to create all of the default domain-wide application directory partitions.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

-

Class dnsDirectoryPartition  
  
{  
  
boolean ApplicationDirectoryPartitions; //Specifies whether support for application directory partitions is enabled on the DNS Server.  
string fqdn; // UTF-8 string that specifies the FQDN of the application directory partition.  
string dpdn; // Unicode string that specifies the distinguished name for the application directory partition head object  
string crDn; // Unicode string that specifies the distinguished name for the application directory partition crossRef object.  
ulong flags; //application directory partition properties (see MS-DNSP for details)  
ulong ZoneCount: //The number of zones from this application directory partition that are loaded in the DNS server's memory.  
ulong state; //The current state of this application directory partition (see MS-DNSP for details)  
ulong replicaCount; // The number of replication locations for the application directory partition  
string replicaArray\[\]; //contains information about replication locations for this application directory partition  
boolean DefaultDirectoryPartitions  
string DirectoryPartition Scope  
ComputerName servers\[\]; // servers enlisted in DNS Application Directory Partition  

}  

  

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Management.Infrastructure.CimInstance#DnsServerDirectoryPartition

Examples

Example 1: Create a DNS application directory partition

This command adds a new DNS application directory partition named ADpart to the local computer.

PS C:\> Add-DnsServerDirectoryPartition -Name "ADpart"

Get-DnsServerDirectoryPartition

Register-DnsServerDirectoryPartition

Unregister-DnsServerDirectoryPartition

Remove-DnsServerDirectoryPartition