Team blog of MCS @ Middle East and Africa

This blog is created by Microsoft MEA HQ near shoring team, and it aims to share knowledge with the IT community.With its infrastructure and development sides,It brings to you the proven best practices and real world experiences from Subject Matter Experts
Follow Us On Twitter! Subscribe To Our Blog! Contact Us

Migrating to SharePoint Host Name Site Collections 2

Migrating to SharePoint Host Name Site Collections 2

  • Comments 1
  • Likes

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 ]


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>:<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

  • hi its very nice & useful,

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment