Loading |
VBScript |
JavaScript |
Powershell |
Search Options: Create an Active Directory Site LinkContent of Create an Active Directory Site Link.vbsMD5 Hash: 9D4C5F116682DF6D6E32478DD9CF64FC |
||
' Description: Creates an Active Directory site link.
strSite1Name = "Ga-Atl-Sales" strSite2Name = "Wa-Red-Sales" strSiteLinkRDN = "cn=[" & strSite1Name & "][" & strSite2Name & "]" intCost = 100 intReplInterval = 60 strDescription = "[" & strSite1Name & "][" & strSite2Name & "]" Const ADS_PROPERTY_UPDATE = 2 Set objRootDSE = GetObject("LDAP://RootDSE") strConfigurationNC = objRootDSE.Get("configurationNamingContext") strSite1DN = "cn=" & strSite1Name & ",cn=Sites," & strConfigurationNC strSite2DN = "cn=" & strSite2Name & ",cn=Sites," & strConfigurationNC Set objInterSiteTransports = GetObject("LDAP://" & _ "cn=IP,cn=Inter-Site Transports,cn=Sites," & strConfigurationNC) Set objSiteLink = objInterSiteTransports.Create("siteLink", strSiteLinkRDN) objSiteLink.Put "cost", intCost objSiteLink.Put "replInterval", intReplInterval objSiteLink.Put "description", strDescription objSiteLink.PutEx ADS_PROPERTY_UPDATE, "siteList", _ Array(strSite1DN, strSite2DN) objSiteLink.SetInfo | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |