GD Bloggers

This is the blog site for Microsoft Global Delivery Communities focused in sharing the technical knowledge about devices, apps and cloud.
Follow Us On Twitter! Subscribe To Our Blog! Contact Us

Migrating to SharePoint Host Name Site Collections 3

Migrating to SharePoint Host Name Site Collections 3

  • Comments 1
  • Likes

In my previous 2 posts on Host Named Site Collections, I laid out the powershell scripts to create Host Name site collections as well as creating managed paths under them.

After that, these site collections can be handled using PowerShell scripts normally.

In case of needing to migrate path-based site collections to host-named site collections, you can simply backup the path-based site collection & restore it to the newly created host named site collection.

A sample script for such backup & restore operation is as follows:

 

$hostHeaderWebApp = "http://<WebAppName>:<WebAppPort>"

$firstHostNamedSiteCollection = “<URL of Host Name Site Collection>”

$OriginalSiteCollection = "<URL of Path Based Site Collection>"

$BackupPath = "c:\temp\TestSiteBackup.bak"

 

Backup-SPSite $OriginalSiteCollection -Path $BackupPath

Restore-SPSite -Identity $firstHostNamedSiteCollection -Path $BackupPath -HostHeader $hostHeaderWebApp -Force

Comments
  • Can I migrate site collection 200 GB in size using this powershell command?

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