Recipe 11.23 Listing the Connection Objects for a Server

11.23.1 Problem

You want to view the connection objects associated with a domain controller.

11.23.2 Solution Using a graphical user interface
  1. Open the Active Directory Sites and Services snap-in.

  2. In the left pane, expand Sites, expand the site that contains the connection object you want to check, expand the Servers container, expand the server that contains the connection object, and click on the NTDS Settings object.

  3. In the right pane, under the name column, it will display which connection objects are automatically generated (by the KCC) and which ones were manually generated. Using a command-line interface
> repadmin /showconn [<DomainControllerName>] Using VBScript
' This code lists the connection objects for a server ' ------ SCRIPT CONFIGURATION ------ strServer = "<ServerName>"  ' e.g. dc01 strSite   = "<SiteName>"    ' e.g. MySite1 ' ------ END CONFIGURATION --------- set objRootDSE = GetObject("LDAP://RootDSE") set objNTDSCont = GetObject("LDAP://cn=NTDS Settings,cn=" & strServer & _                             ",cn=servers,cn=" & strSite & ",cn=sites," & _                              objRootDSE.Get("configurationNamingContext") ) objNTDSCont.Filter = Array("ntdsConnection") WScript.Echo "Connection objects for " & strSite & "\" & strServer for each objConn in objNTDSCont    if objConn.Get("options") = 0 then       Wscript.Echo "  " & objConn.Get("cn") & " (MANUAL)"    else       Wscript.Echo "  " & objConn.Get("cn") & " (AUTO)"    end if next

Another option for programmatically getting the connection objects for a server is to use the GetDSAConnections method from the IADsTool interface.

11.23.3 Discussion

Connection objects are used to replicate inbound changes to a domain controller. By viewing the connection objects for a server you can see what domain controllers it receives updates from. Connection objects are created automatically by the KCC, but can be created manually if necessary.

11.23.4 See Also

Recipe 11.22 for creating a connection object

Active Directory Cookbook
Active Directory Cookbook, 3rd Edition
ISBN: 0596521103
EAN: 2147483647
Year: 2006
Pages: 456

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: