Create a HNSC site collection

posted in: HNSC, PowerShell | 0

Script to create host named site collections

This post is step 2.

This script works great to create the HNSC after you have created the web application and top site with the script that I created on this other post.

You’ll need to change all the wingtip references to your domain UPN and make sure you have the setup account for your domain entered correctly.  If you don’t have a setup account, then you may have erroneously installed SharePoint with the Farm account, in which case you should read my book, Troubleshooting SharePoint to get more on that fiasco.  You can replace the server names with as many servers in your farm, in a comma separated list (e.g. “Server1”,”Server2”,”Server3”) and you do not list the SQL server, which should go without saying; but, sometimes it’s better to be safe then sorry.

The farm below had a setup account named wingtip\2016sp_installer and the domain was named wingtip.com with a upn of wingtip.

To watch this in action, check out the video on my YouTube channel!