Forum Discussion

BarryAnderson's avatar
BarryAnderson
Copper Contributor
Mar 23, 2023

Create SharePoint "Organization Templates"

Hello,

 

I'm looking to add a new Organization Template into the template list offered in SharePoint Online. I've captured the site script from an existing site, added it to the site scripts and added it to site designs.

 

PowerShell used:

Connect-PnPOnline -Url $site -Interactive
$SiteSchema = Get-PnPSiteScriptFromWeb -Url $site -Lists $relativeListUrls -IncludeBranding -IncludeLinksToExportedItems -IncludeRegionalSettings -IncludeSiteExternalSharingCapability -IncludeTheme

Connect-PnPOnline -Url $spo -Interactive
$SiteScript = Add-PnPSiteScript -Title $name -Description $description -Content $SiteSchema
Add-PnPSiteDesign -Title $name -Description $description -SiteScriptIds $SiteScript.Id -WebTemplate TeamSite

 

The template shows in the Organization Templates as expected but I am having a few issues, either I'm doing this wrong or I'm not understanding something.

 

When applying the template to a new site:

 

Working

  • Lists are created as expected
  • Quick launch items are created for new lists
  • Style applied

Issue

  • Quick launch is not the same as the site template was captured from. I would like the items shown to be exactly the same.
  • The default home page is not updated to match the site the template was captured from. How to I achieve this? I know it's possible as the default MS templates update the landing page.
  • I am also having an issue with a Project Plan in the template, can these be templated?

 

Any advice, pointers or corrections to my thinking would be appreciated.

 

Thanks.

5 Replies

  • MaxZambrano's avatar
    MaxZambrano
    Copper Contributor

    I am having exactly the same problem.
    Same things work, same issues (no list content, no branding applied).
    How we can get additional input from Microsoft or the PnP community?

    • matt_p_s's avatar
      matt_p_s
      Copper Contributor

      MaxZambrano 

      I wasn't able to get the templates to apply correctly and decided to take another approach. In the end I used a range of PnP Powershell commands to build each site from scratch, therefore emulating a template.

       

  • Matt_P_Standing's avatar
    Matt_P_Standing
    Copper Contributor
    Hi Barry,

    Did you ever get to the bottom of this? I am having a similar issue where the template isn't fully applied.

    Mat

Resources