11.1.1 ProblemYou want to create a site. 11.1.2 Solution11.1.2.1 Using a graphical user interface
11.1.2.2 Using a command-line interfaceCreate 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 11.1.2.3 Using VBScript' 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") objLicensing.SetInfo ' Create the NTDS Site Settings object set objNTDS = objSite.Create("nTDSSiteSettings","cn=NTDS Site Settings") objNTDS.SetInfo ' Create the Servers container set objServersCont = objSite.Create("serversContainer","cn=Servers") objServersCont.SetInfo WScript.Echo "Successfully created site " & strSiteName 11.1.3 DiscussionTo create a site in Active Directory, you have to create a number of objects. The first is a site object, which is the root of all the other objects. The site object contains the following:
After these objects are created, you've essentially created an empty site. If you didn't do anything else, the site would not be of much value. To make it usable, you need to assign subnet objects to it (see Recipe 11.4), and add the site to a siteLink object to link the site to other sites (see Recipe 11.7). At that point, you can promote or move domain controllers into the site, and it should be fully functional. 11.1.4 See AlsoMS KB 318480 (HOW TO: Create and Configure an Active Directory Site in Windows 2000) |