0

I have to create the SharePoint modern site templates, that I can access from "From your organization templates. I have tried following PowerShell but it seems like pages are not getting applied

Connect-PnPOnline -UseWebLogin
Get-PnPSiteScriptFromWeb -url https://test.sharepoint.com/sites/POC -IncludeAll
$Json = Get-PnPSiteScriptFromWeb -url https://test.sharepoint.com/sites/POC -IncludeAll
$sc=Add-PnPSiteScript -Title "Department template" -Description "Department template" - 
Add-PnPSiteDesign -Title "Department template" -WebTemplate "68" -SiteScripts $sc,ID -Description "<Description displayed in Step 5>"enter code here

Article or script to create Site Template

1 Answer 1

2

There's a limited number of actions that can be applied via site scripts/site designs, and if you are trying to provision pages using this method, you might need to look at using a Power Automate flow to enhance the provisioning process.

There is some documentation here that might be helpful

https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview#pnp-provisioning-and-customization-using-power-automate

Also, there is an article outlining how you can invoke a PnP template using Flows and Azure Fuctions here

https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-pnp-provisioning

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.