O'Reilly logo

Active Directory Cookbook by Robbie Allen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17.3. Adding or Removing a Replica Server for an Application Partition

Problem

You want to add or remove a replica server for an application partition. After you’ve created an application partition, you should make at least one other server a replica server in case the first server fails.

Solution

Using a command-line interface

Use the following command to add a replica server for an application partition:

> ntdsutil "dom man" conn "co to se <DomainControllerName>" q "add nc replica[RETURN]
<AppPartitionDN> <DomainControllerName>" q q

Use the following command to remove a replica server for an application partition:

> ntdsutil "dom man" conn "co to se <DomainControllerName>" q "remove nc replica[RETURN]
<AppPartitionDN> <DomainControllerName>" q q

Using VBScript

' This code adds or removes a replica server for the
' specified application partition
' ------ SCRIPT CONFIGURATION ------
strAppPart = "<AppPartitionFQDN>" ' DNS name of the application partition

' Hostname of server to add as replica for app partition. 
' This needs to match the common name for the DC's server object.
strServer  = "<DomainControllerName>" ' e.g. dc01 ' Set to True to add server as new replica or False to remove boolAdd = True ' ------ END CONFIGURATION --------- ' Constants taken from ADS_PROPERTY_OPERATION_ENUM const ADS_PROPERTY_APPEND = 3 const ADS_PROPERTY_DELETE = 4 set objRootDSE = GetObject("LDAP://RootDSE") ' ---------------------------------------------------------- ' First find the NTDS Settings object ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required