Migrating to SharePoint Host Name Site Collections 2

After the creation of host names site collections as per the script mentioned in my previous article, you might find the need to create managed path and have separate site collections for them. [Note the technet article on managed path Host Name Site Collections as it’s different than managed path under Path-based site collections http://technet.microsoft.com/en-us/library/cc288637.aspx#section5 ]

 

The script to create a managed path under a host named site collection and creating a site collection under it are as follows:

$hostHeaderWebApp = “http://<WebAppName&gt;:<WebAppPort>”

$ManagedPathLocation = “sites”

$ManagedHostNamedSiteCollection = “http:// <URL of Host Name Site Collection>/Sites/TestManaged”

New-SPManagedPath $ManagedPathLocation -HostHeader

New-SPSite $ManagedHostNamedSiteCollection -OwnerAlias <OwnerDomainAccount> -HostHeaderWebApplication $hostHeaderWebApp -Template $webTemplate

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.