September 2003
Intermediate to advanced
624 pages
15h 49m
English
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.
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
' 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 ...