change ISTG role immediately using command.

Sina Hassanzadeh Ruhalaei 21 Reputation points
2020-12-09T08:19:46.613+00:00

Hi All.
i know that, if a domain controller which holding the ISTG role is offline for more than 60 minutes, another domain controller in the site, will automatically take over this role.
My question is: how to force this ISTG role change immediately using command? i mean i need to finish this 60 minutes immediately in seconds by a command.
best regards
Sina HR.

Windows Server 2012
Windows Server 2012
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,580 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,443 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Vicky Wang 2,731 Reputation points
    2020-12-10T09:17:30.937+00:00

    You want to move the ISTG for a site to another domain controller. This happens automatically if you take the current ISTG offline, but you may want to transfer the role to a server that is more optimal in your environment.

    11.26.2 Solution
    11.26.2.1 Using a graphical user interface
    Open ADSI Edit.

    Connect to the CNC if it is not already displayed in the left pane.

    In the left pane, browse the Configuration NC Sites.

    Click on the site you want to transfer the ISTG for.

    In the right pane, double-click CN=NTDS Site Settings.

    Modify the interSiteTopologyGenerator attribute to include the NTDS Settings object of the domain controller you want to transfer the ISTG role to.

    Click OK.

    11.26.2.2 Using VBScript
    ' This code forces a new ISTG in a site.
    ' ------ SCRIPT CONFIGURATION ------
    ' Name of site to transfer ISTG in
    strSiteName = "<SiteName>" ' e.g. Raleigh
    ' Site the new ISTG server is in
    strNewISTGSite = "<ISTGSiteName>" ' e.g. Raleigh
    ' Common name of server object for new ISTG
    strNewISTGName = "<DomainControllerName>" ' e.g. dc01
    ' ------ END CONFIGURATION ---------

    set objRootDSE = GetObject("LDAP://RootDSE")
    set objSiteSettings = GetObject("LDAP://cn=NTDS Site Settings,cn=" & _
    strSiteName & ",cn=sites," & _
    objRootDSE.Get("ConfigurationNamingContext"))
    strCurrentISTG = objSiteSettings.Get("interSiteTopologyGenerator")

    objSiteSettings.Put "interSiteTopologyGenerator", _
    "cn=NTDS Settings,cn=" & strNewISTGName & _
    ",cn=servers,cn=" & strNewISTGSite & ",cn=sites," & _
    objRootDSE.Get("ConfigurationNamingContext")
    objSiteSettings.SetInfo
    WScript.Echo "ISTG for " & strSiteName & " changed from:"
    WScript.Echo " " & strCurrentISTG
    WScript.Echo "To"
    WScript.Echo " " & objSiteSettings.Get("interSiteTopologyGenerator")

    1 person found this answer helpful.

  2. Anonymous
    2020-12-09T13:20:22.25+00:00

    You can follow along here.
    https://www.peppercrew.nl/index.php/2011/05/moving-the-istg-role-to-another-domain-controller/

    --please don't forget to Accept as answer if the reply is helpful--


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.