Manages directory partitions for Active Directory Domain Services (AD DS) or Active Directory Lightweight Directory Services (AD LDS).

Ntdsutil is a command-line tool that is built into Windows Server 2008. It is available if you have the AD DS or AD LDS server role installed. To use ntdsutil, you must run the ntdsutil command from an elevated command prompt. To open an elevated command prompt, click Start, right-click Command Prompt, and then click Run as administrator.

For examples of how to use this command, see Examples.

Syntax

connections
[select operation target] [add nc replica %s1 %s2] [create nc %s1 %s2] [create nc %s1 %s2 %s3] [delete nc %s] [list] [list nc information %s] [list nc replicas %s] [precreate %s1 %s2] [remove nc replica %s1 %s2] [set nc reference domain %s1 %s2] [set nc replication notification delay %s %d1 %d2]

Parameters

Parameter Description

add nc replica %s1 %s2

Adds the Active Directory domain controller or AD LDS instance with full DNS name %s2 to the replica set for the application directory partition with distinguished name %s1. If you specify "NULL" for %s2, then this command uses the currently connected Active Directory domain controller or AD LDS instance.

connections

Invokes the server connections submenu. See Remarks for more information.

create nc %s1 %s2

Creates the application directory partition with distinguished name %s1, on the Active Directory domain controller or AD LDS instance with full DNS name %s2. If you specify "NULL" for %s2, then this command uses the currently connected Active Directory domain controller.

Use this command only with AD DS. For AD LDS, use create nc %s1 %s2 %s3.

create nc %s1 %s2 %s3

Creates the AD LDS application directory partition with distinguished name %s1, of object class %s2 on computer named %s3. You should annotate the %s3 value with the LDAP port number. For example, type adam1.fabrikam.com:389.

If you specify "NULL" for %s3, then this command uses the currently connected AD LDS instance.

delete nc %s

Completely removes the application directory partition or pre-created cross-reference with distinguished name %s from the AD DS or AD LDS.

list

Lists known naming contexts.

list nc information %s

Shows the reference domain, and replication delays for the application directory partition with distinguished name %s.

list nc replicas %s

Shows the list of Active Directory domain controllers or AD LDS instances in the replica set for the application directory partition with distinguished name %s.

precreate %s1 %s2

Precreates cross-reference object for the domain or application directory partition with distinguished name %s1 allowing a server with DNS name %s2 to be promoted as an Active Directory domain controller for the domain or create the application directory partition.

This can also be used to precreate cross-reference objects for application directory partitions for AD LDS. For AD LDS, %2 should be hostname:ldapPort:ldapSslPort, such as adam1.fabrikam.com:389:636.

remove nc replica %s1 %s2

Deletes the AD DS or AD LDS instance with DNS name %s2 from the replica set of the application directory partition with distinguished name %s1. If you specify "NULL" for %s2, then this command uses the currently connected Active Directory domain controller or AD LDS instance.

select operation target

Invokes the Select operation target submenu.

set nc reference domain %s1 %s2

Sets the reference domain of application directory partition with distinguished name %s1 to domain with distinguished name %s2.

set nc replication notification delay %s %d1 %d2

Sets the notification delays of directory partition with distinguished name %s to %d1 and %d2 seconds, where %d1 is the delay between notifying the first Active Directory domain controller or AD LDS instance of changes and %d2 is the delay of notifying subsequent Active Directory domain controllers or AD LDS instances of changes. If you specify -1 in either #d1 or %d2, this command will not modify the corresponding delay (in case you are trying to modify only one delay). If you specify any other negative number, the command will delete the delay. Delays are always set on the naming master.

quit

Takes you back to the previous menu or exits the utility.

?

Displays help at the command prompt.

Help

Displays help at the command prompt.

Remarks

  • Before you can run the DS behavior subcommand, you need to connect to a specific AD Ds or AD LDS instance by using the connections parameter.

Examples

To create the application directory partition o=Contoso,c=US, at the partition management prompt type:

create nc o=Contoso,c=US organization localhost:50002