Create HNSC Web application and top site

posted in: HNSC, PowerShell | 2

PowerShell to create the host named site collection web application and top site

This post is step 1 of two steps to get host named site collections off the ground in your SharePoint.

In this script you need to edit the following variables, and any references to your domain

 

$servers

$applicationPool

$serviceAcct

$webApp

$webAppURL

$contentDB

$primarySiteCollectionOwnerAcct

$PrimarySCOwnerEmail

$SecondaryOwnerAcct

$SedondaryOwnerEmail

$webApp0URL

Essentially, you replace wingtip with your domain name, and .com with your tld if you have a different top level domain

Also pay attention to the service account, that it is the correct name

 

After you run this you need to run the script to create the host named site collections

The script that creates the new host named site collections can be found at this post.

2 Responses

  1. […] 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. […]

  2. […] Here’s a script I wrote that creates the HNSC Web application, content database for the site collection of the top site, and the top site itself. – https://anothersharepointblog.com/create-hnsc-web-application-and-top-site […]

Leave a Reply