Forum Discussion
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': Get started creating SharePoint site templates and site scripts | Microsoft Learn
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 (Create and add site design to SharePoint site with site columns, content type. | PnP Samples) 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. (Overcome the 30 action site script limitation in SharePoint Online – Beau Cameron). 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.
- Invoking unlimited actions with Site Design Tasks and Microsoft Flow - Reza's Blog (rezadorrani.com) (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)
- The Ultimate Guide to SharePoint Site Templates and Site Scripts (laurakokkarinen.com) (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!