Forum Discussion

steve_spo's avatar
steve_spo
Copper Contributor
Dec 28, 2023

Create site Template script over 30 items using Powershell

Hello,

I've successfully created SharePoint Online site Templates via Powershell which are under the 30 script limit and work as expected during '+ Create Site': https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/get-started-create-site-design

However, we create a new Team Site for each company project and are trying to standardize the look, folders, permissions, etc. via a single Template but which requires more than 30 scripts to achieve.

 

Binding multiple script.ID using Add-SPOSiteDesign (https://pnp.github.io/script-samples/spo-add-site-design-with-custom-list/README.html?tabs=pnpps) does not increase the total combined limit of 30 scripts AND using Add-SPOSiteDesignTask methods to increase the limit above 30 scripts appears to require the new Site url. (https://beaucameron.com/2018/11/20/site-scripts-actions-limitation/). As this url is being created dynamically under SharePoint Online '+ Create Site', the full path cannot be hard-coded.

 

As an alternate, I attempted to use Power Automate Flows but this was also unsuccessful. 

- https://rezadorrani.com/index.php/2019/01/14/invoking-unlimited-actions-with-site-design-tasks-and-microsoft-flow/ (resulted in: "The request must be authenticated only by Shared Access scheme.")

- https://beaucameron.com/2019/01/10/invoking-a-site-design-task-using-rest/  (AddSiteDesignTaskToCurrentWeb - also requires url / unable to translate to a Flow)

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

- many others...

 

Is there any way to use Add-SPOSiteDesignTask during a Template site creation? My preference is to do this direct via JSON / Powershell scripts if possible but I cannot seem to dynamically assign the url within a script / during site creation. Simply summary, I'm attempting to use greater than 30 scripts during a site Template creation and will accept any option if I can get it to work!

 

 

No RepliesBe the first to reply

Resources