Over the last year or so many of my posts have been related to the PnP Provisioning Engine.Office 365 - SharePoint 2013/2016 - Replicating or migrating SharePoint sites. Microsoft Office 365, Microsoft SharePoint, Patterns And Practices, PowerShell, SharePoint 2013, SharePoint 2016 687474703a2f2f692e696d6775722e636f6d2f6c3031686876452e706e67

I’ve created multiple scripts to replicate my whole intranet from one tenant to another. I’ve set this all up in such a way that this would work for any intranet solution based on Office 365 or SharePoint on-premises solutions.

Big advantages of this solution:

  • It can handle multiple pages, unlike PnP out of the box
  • It can handle complex combinations of look-up fields and lookup lists
  • One click for
    • Reading all templates form a whole tenant
    • Updating a whole tenant with the set of templates
    • both reading templates and applying them
  • An option to disable/enable features
  • Fixing template issues in between getting the templates and applying them without any user intervention such as:
    • Updating security setting (usernames in different domains)
    • Fixing templates with mixes of team sites and publishing sites
  • Switching between latest and older versions of PnP PowerShell
  • Migrating simple data in lists ( e.g. lookup lists)
  • Handle external lists
  • Migrate from On-Premises to Office 365
  • … you name what you would like to add to this list

So this isn’t just about provisioning a solution, it is also about replicating your solutions between Development, Test and Production.

Are you interested in this solution then please leave a comment below.


Avatar for Pieter Veenstra

By Pieter Veenstra

Business Applications Microsoft MVP working as a Principal Architect at HybrIT Services Ltd. You can contact me using contact@sharepains.com

16 thoughts on “Office 365 – SharePoint 2013/2016 – Replicating or migrating SharePoint sites.”
  1. Hi I am extremely interested in your solution as this is an issue I am currently struggling with. I have tried PnP and ShareGate and had issues with both around lookups. Also want the solution to support replicating prod sites collections down to dev and stage for maintenance/future development purposes

  2. Pieter, still very interested in this (and helping out if I can). Curious as to how much reporting is or could be included? Documenting which templates (and versions of templates) sites are using, features enabled, etc. could be very helpful.

    1. Hi John, I will soon publish more details. But in short how things work is:
      an xml specifying the multiple tenants, site collections and sites. for each site I’m specifying which workarounds need to be applied.
      Then I’ve got a script that reads the xml and collects all the templates as specified in the xml
      Then I’ve got a script that applies all the templates ( again all read from the xml)
      A 3rd script does a combination of the two and copies one tenant to another

      I’m planning to add a 4th script that can generate the xml from just being given a tenant name.

  3. Hello Pieter

    I’m also interested in your scripts as I have a need for some of the functionality you developed. Specifically lookup lists and and templates to be migrated.

  4. I’d be interested to learn more.

    I want to be able to also:
    -prepare a “template” site (modern or classic) with page, list, document library, content type, logo and so on and then “save as template” with pnp and create new site whit a “copy” of this template (I try actual PnP but is impossible usage, many bug/problems, learning curve high, debug not simple, etc.) For now I discard it.
    -copy list (with items and permission) and document (with files, folders and permission) from one site to another. I would a Copy-PnPList , Copy-PnPDocumentLibrary, Import-Export PnPList/Documenti to xml/folder to disk for migrare/reorganization.

Leave a Reply

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

Discover more from SharePains by Microsoft MVP Pieter Veenstra

Subscribe now to keep reading and get access to the full archive.

Continue Reading

%d bloggers like this: