How To Migrate multiple SharePoint Site Collections

default post thumbnails

As you probably know, Sharegate can migrate sites, lists, libraries etc. It essentially handles all objects at the site collection level and below. A typical migration includes the creation of the target site collection prior to the actual migration since Sharegate’s graphical user interface (GUI) doesn’t allow to create the destination site collection.

With that in mind, you might start to understand the usefulness of this article, since the perspective of migrating multiple site collections can be frightening, especially if the sheer number of sites to migrate is large and you need multiple steps to create all target site collections and complete each and every migration one by one.

My goal through this article is to show how to complete this type of SharePoint migration, while keeping it simple, whether you are a Sharegate veteran who has multiple successful migrations under your belt, or a newcomer to the migration universe. The Sharegate Migration Shell will be key to complete this enterprise. Please note that PowerShell 3.0 is needed in order to use the Sharegate Migration Shell.

Reduce your number of steps

The objective is very simple: migrating all site collections in the least number of steps. In order to do that, the first step is to list all the site collections at the source, along with the site templates they use and their owners. You can export this data to a CSV file through a SharePoint Management Shell command on your source server.

Migrate sharepoint site collections powershell

Once the file has been generated, it will be used to create target site collections corresponding to the templates (team site) and owners defined in the script. This can be done through a SharePoint Management Shell command on your destination server.

Migrate sharepoint site collections powershell

From this point on all the other steps and commands will be executed with the Sharegate Management Shell. They need to be ran from the computer where Sharegate is installed, which can be either the source server, the destination server or any other computer that has access to both sites through the browser.

You can either run the Sharegate Migration Shell or Import the Sharegate module in the SharePoint Management Shell. Basically, the script will ensure that all your sites listed in the csv get copied along with their subsites.

Migrate sharepoint site collections powershell

After each site collection migration, a migration report will be generated and exported to the designated location on your machine for future reference. Please note that the Sharegate GUI reporting section will also contain the reports for those migrations.

Finally, after the first migration is over, you might want to run a delta copy to bring the new changes that happened at theh source since the first migration was done. You can do so using the incremental copy switch.

You can always customize your migration

Let’s recap, the scripts explained above will list your site collections at the source, create the necessary site collections at the destination and migrate all sites and subsites, then bring over the delta if you perform the migration in two steps. Obviously, you have plenty of opportunities to customize the methods used in order to get more personalized results. For instance, you can manually edit the csv file so that only the desired sites get migrated or add a column to specify the Site template to be use similarly to the URLs. You can also split the source site collections in order to be able to run incremental migrations of specific sites in the future. The different scenarios that can be handled by customizing those scripts are infinite! 

For more information on this subject, check out How to successfully Migrate Site Collections or this video of Benjamin Niaulin that explains how to migrate site and site collections.

What did you think of this article?

Recommended by our team

Your biggest Microsoft 365 jobs, made easy

15-day full-featured trial—no strings, no credit card.

Spot Icon

Smooth Google migration  Migrate from Google Drive to M365 the right way