11.25. Finding the ISTG for a Site

Problem

You want to find the Inter-Site Topology Generator (ISTG) for a site.

Solution

Using a graphical user interface

  1. Open the Active Directory Sites and Services snap-in.

  2. Click on the site you are interested in.

  3. In the right pane, double-click on the NTDS Site Settings object.

  4. The ISTG will be displayed under Inter-Site Topology Generator if one is present.

Using a command-line interface

> repadmin /istg <DomainControllerName>

This command is available only with the Windows Server 2003 version of repadmin.

Using VBScript

' This code finds the ISTG for the specified site.
' ------ SCRIPT CONFIGURATION ------
strSiteName = <SiteName>  ' e.g. Raleigh
' ------ END CONFIGURATION ---------

set objRootDSE = GetObject("LDAP://RootDSE")
set objSiteSettings = GetObject("LDAP://cn=NTDS Site Settings,cn=" & _
                                strSiteName & ",cn=sites," & _
                                objRootDSE.Get("ConfigurationNamingContext"))
on error resume next
strISTGDN = objSiteSettings.Get("interSiteTopologyGenerator")
if (strISTGDN <> "") then
   set objNTDSSettings = GetObject("LDAP://" & strISTGDN)
   set objServer = GetObject( objNTDSSettings.Parent )
   WScript.Echo "ISTG for site " & strSiteName & " is " & _
                objServer.Get("dnsHostName")
else
   WScript.Echo "No ISTG found for site " & strSiteName
end if

Discussion

One domain controller in every site is picked as the ISTG for that site. While each domain controller is responsible for creating its own intra-site connection objects, the ISTG for a site is responsible for creating ...

Get Active Directory Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.