Forum Discussion

kenneho's avatar
kenneho
Brass Contributor
Aug 25, 2020
Solved

Copy page/news template between sites using powershell

Hi.   I'd like to be able to create a page/news template on site A, and copy it over site B. I found a way to copy files over from site A to site B by running something like Get-PnPFile to download...
  • Matti Paukkonen's avatar
    Aug 26, 2020

    Hi,

     

    You need to have at least one template created before copied files are visible on Templates gallery. I noticed this when copying templates over with Power Automate.

     

    I have been using PnP Provisioning Template to copy page templates between sites. If you are interested, you can check out my blog post about this topic.
    https://mattipaukkonen.com/2020/07/02/distribute-sharepoint-page-templates-with-pnp-powershell-and-provisioning-templates/

     

    Idea is first get all client side pages to a provisioning template, create a new template object with just page templates and apply it to a target site.