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.4. Finding the Replica Servers for an Application Partition

Problem

You want to find the replica servers for an application partition.

Solution

Using a graphical user interface

  1. Open ADSI Edit.

  2. Connect to the configuration naming context of the forest the application partition is in, if it is not already present in the left pane.

  3. Expand the configuration naming context and click on the Partitions container.

  4. In the right pane, right-click on the crossRef object that represents the application partition and select Properties.

  5. Under Attributes, select the msDS-NC-Replica-Locations attribute.

Using a command-line interface

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

Using VBScript

' This code displays the DN of each domain controller's 
' nTDSDSA object that is a replica server for the
' specified app partition
' ------ SCRIPT CONFIGURATION ------
' Fully qualified DNS name of app partition 
strAppPart = "<AppPartitionFQDN>" ' e.g. apps.rallencorp.com ' ------ END CONFIGURATION --------- set objRootDSE = GetObject("LDAP://RootDSE") strBase = "<LDAP://cn=Partitions," & _ objRootDSE.Get("ConfigurationNamingContext") & ">;" strFilter = "(&(objectcategory=crossRef)(dnsRoot=" & strAppPart & "));" strAttrs = "msDS-NC-Replica-Locations;" strScope = "onelevel" set objConn = CreateObject("ADODB.Connection") objConn.Provider = "ADsDSOObject" objConn.Open "Active Directory Provider" set objRS = objConn.Execute(strBase & strFilter & strAttrs ...

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