Evo i skripte:
Code:
' This VBScript code forces a new ISTG in a site.
' ---------------------------------------------------------------
' From the book "Active Directory Cookbook" by Robbie Allen
' Publisher: O'Reilly and Associates
' ISBN: 0-596-00466-4
' Book web site: http://rallenhome.com/books/adcookbook/code.html
' ---------------------------------------------------------------
' ------ 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")
http://www.rallenhome.com/book...rc/11.26-transfer_istg.vbs.txt