September 2003
Intermediate to advanced
624 pages
15h 49m
English
You want to create a site.
Open the Active Directory Sites and Services snap-in.
Right-click on the Sites container and select New
Site.
Beside Name, enter the name of the new site.
Under Link Name, select a site link for the site.
Click OK twice.
Create an LDIF file called create_site.ldf with the following contents:
dn: cn=<SiteName>,cn=sites,cn=configuration,<ForestRootDN> changetype: add objectclass: site dn: cn=Licensing Site Settings,cn=<SiteName>,cn=sites,cn=configuration,<ForestRootDN> changetype: add objectclass: licensingSiteSettings dn: cn=NTDS Site Settings,cn=<SiteName>,cn=sites,cn=configuration,<ForestRootDN> changetype: add objectclass: nTDSSiteSettings dn: cn=Servers,cn=<SiteName>,cn=sites,cn=configuration,<ForestRootDN> changetype: add objectclass: serversContainer
then run the following command:
> ldifde -v -i -f create_site.ldf
' This code creates the objects that make up a site.
' ------ SCRIPT CONFIGURATION ------
strSiteName = "<SiteName>" ' e.g. Dallas ' ------ END CONFIGURATION --------- set objRootDSE = GetObject("LDAP://RootDSE") set objSitesCont = GetObject("LDAP://cn=sites," & _ objRootDSE.Get("configurationNamingContext") ) ' Create the site set objSite = objSitesCont.Create("site","cn=" & strSiteName) objSite.SetInfo ' Create the Licensing Site Settings object set objLicensing = objSite.Create("licensingSiteSettings", _ "cn=Licensing Site Settings") ...