' Publish License Server Across Trusted AD Sites
Const ADS_PROPERTY_APPEND = 3
Set objRootDSE = GetObject("LDAP://RootDSE")
strConfigContainer = objRootDSE.Get("configurationNamingContext")
Set objSysInfo = CreateObject("ADSystemInfo")
strSite = objSysInfo.SiteName
strComputerName = objSysInfo.ComputerName
Set adsLS = GetObject("LDAP://CN=TS-Enterprise-License-Server,CN=" & strSite &_
",CN=sites," & strConfigContainer)
Set adsContainer = GetObject("LDAP://CN=" & strSite & ",CN=sites," & strConfigContainer)
Set adsLS = adsContainer.Create("LicensingSiteSettings" , "CN=TS-Enterprise-License-Server")
adsLS.PutEx ADS_PROPERTY_APPEND, "siteServer", Array(strComputerName)
adsLS.SetInfo