Microsoft Office Tutorials and References
In Depth Information
If you go to that site in your browser, you’ll be asked to choose the template you want to use and
enter some users and groups ( just as you did with self-service site creation). After you enter the
users and groups, you’ll be taken to the new site, where you’ll see the normal, expected URL in
the address bar.
You can create the same site using a host header for the site collection itself (instead of for the web
application). It’s still in the http://spf2 web application and must abide by that web
application’s settings; however, the URL would be different, such as http://camper.dem0tek.lcl in
my example, rather than http://sp2/sites/camper. Think of it as essentially masking the real
normal web application–based address of the site collection with the host header.
The command for this would be the following:
STSADM -o createsite -url http://camper.dem0tek.lcl -owneremail shareadmin@
dem0tek.com -ownerlogin dem0tek\shareadmin -hhurl http://spf2
You’ll notice two changes. The -url switch displays the desired host header URL (rather than the
web application’s managed path), and the -hhurl switch points to the web application in which
you want to create the site collection.
Once again, if you browse to http://camper.demotek.lcl, you’ll be prompted to choose a site
template and add users and groups. Then you’ll be taken to the new site, displayed with the nice
host header URL in the address bar.
You can do the same thing in the SharePoint Management shell (or PowerShell console).
First make sure the account you are logged in with has the correct permissions to use PowerShell
(you need to be a farm administrator, as well as owner of both the configuration database for the
farm and the content database where the site collection is located). See Chapter 14 for details.
Then, to create the site collection, you can use the following command:
New-SPSite http://camper.dem0tek.lcl -OwnerAlias “dem0tek\shareadmin”
-HostHeaderWebApplication http://spf2
Search JabSto ::




Custom Search