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

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 ...

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