Add-DnsServerDirectoryPartition

Creates a DNS application directory partition.

Syntax

Add-DnsServerDirectoryPartition
   [-Name] <String>
   [-AsJob]
   [-CimSession <CimSession[]>]
   [-ComputerName <String>]
   [-PassThru]
   [-ThrottleLimit <Int32>]
   [-Confirm]
   [-WhatIf]
Add-DnsServerDirectoryPartition
   [-AsJob]
   [-CimSession <CimSession[]>]
   [-ComputerName <String>]
   [-PassThru]
   [-ThrottleLimit <Int32>]
   -Type <String>
   [-Confirm]
   [-WhatIf]

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.

Examples

Example 1: Create a DNS application directory partition

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

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

Required Parameters

-Name

Specifies a name for the new DNS application directory partition.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Type

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-AsJob

ps_cimcommon_asjob

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227967 or Get-CimSessionhttp://go.microsoft.com/fwlink/p/?LinkId=227966 cmdlet. The default is the current session on the local computer.

Type:CimSession[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ComputerName

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.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
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.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ThrottleLimit

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.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

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

Microsoft.Management.Infrastructure.CimInstance#DnsServerDirectoryPartition