Forum Discussion

Renato Rossetti's avatar
Renato Rossetti
Copper Contributor
Jan 28, 2019
Solved

workaround | copy a layout from an existing sharepoint team site

we need to create hundreds of SharePoint team site (powershell) and the layout must be identical, can be possible create a new team site using an existing one as a template or exporting and importing Layout or change the default team site?

thank you in advance

  • Hi Renato Rossetti 

     

    You could use PnP Provisioning Templates which should do the job quite nicely for you.

     

    Ensure you have the pre-reqs installed (https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps installed) and then follow the high level description below:

     

    1. Create your template using the SharePoint UI
    2. Export the template using the https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpprovisioningtemplate?view=sharepoint-ps cmdlet
    3. Create your new site collection
    4. Apply the template using the https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/apply-pnpprovisioningtemplate?view=sharepoint-ps cmdlet

    Build steps 3 and 4 into a loop so that it will repeat as you need it to.

     

    I've used this same approach a number of times, so happy to help if you get stuck. Just worth while thinking about any complexities that might be on the site in terms of syndicated content types, customisations and workflows as that may need a little bit of additional work.

4 Replies

  • Renato Rossetti's avatar
    Renato Rossetti
    Copper Contributor

    I've found this useful link with a complete guide:

    https://laurakokkarinen.com/the-ultimate-guide-to-sharepoint-site-designs-and-site-scripts/

    Thanks to all

  • Matt Weston's avatar
    Matt Weston
    Iron Contributor

    Hi Renato Rossetti 

     

    You could use PnP Provisioning Templates which should do the job quite nicely for you.

     

    Ensure you have the pre-reqs installed (https://docs.microsoft.com/en-us/powershell/sharepoint/sharepoint-pnp/sharepoint-pnp-cmdlets?view=sharepoint-ps installed) and then follow the high level description below:

     

    1. Create your template using the SharePoint UI
    2. Export the template using the https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/get-pnpprovisioningtemplate?view=sharepoint-ps cmdlet
    3. Create your new site collection
    4. Apply the template using the https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/apply-pnpprovisioningtemplate?view=sharepoint-ps cmdlet

    Build steps 3 and 4 into a loop so that it will repeat as you need it to.

     

    I've used this same approach a number of times, so happy to help if you get stuck. Just worth while thinking about any complexities that might be on the site in terms of syndicated content types, customisations and workflows as that may need a little bit of additional work.

    • Renato Rossetti's avatar
      Renato Rossetti
      Copper Contributor

      excuse J.C.G.M. my incompetence on SharePoint but what exactly do you mean by create your template with the graphical interface of SharePoint? thanks

      • Matt Weston's avatar
        Matt Weston
        Iron Contributor

        Hi Renato Rossetti never apologise for not knowing something, because unless you ask the question you'll never know :)

         

        Basically, build the site in the browser as you normally would, so create your content types, lists, libraries, pages etc. You can then export that site as a template and redeploy it on another.

Resources