SOLVED

Get a Sharepoint Site Script from specific site

Copper Contributor

Hi,

I'm quite new to the topic of site scripts, but as far as I understood the idea of these is to have a .json specification that is loaded onto the Sharepoint and then can be used as template. Also there is the possiblity to use this .json directly to create a Sharepoint site via Powershell. 

 

Now I found the total overview: https://developer.microsoft.com/json-schemas/sp/site-design-script-actions.schema.json

 

And the Documentation: https://docs.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-json-schema

 

But as far as I understood there is no possiblity to get this .json script from an already exsiting Sharepoint. I understand, that the script is what a script is and is executed in the order the actions are entered, but I was wondering if there is an easier way then going through the whole sharepoint site and writing the script and all actions one by one. 

 

The template I try to get as site script must include creating lists, with specific fields, load webparts we already added to the app catalog and set the properties of these on specific pages, create a sitegroup and set site and list specific permissions and maybe load data.

 

So my questions are:

1. Is there a way to get the site script of a already created sharepoint site, that isn't based on a site script?

2. Is it possible to set properties of webparts directly when adding them on a site?

3. Is it possible to already set up a new sitegroup and have specific permission levels and permissions per site/list?

4. Is it possible to load data into a table already, or should it be done later (the data varies between different runs of the template)?

 

Thanks for any answer to one of the questions and I hope these are not asked before, but I couldn't find one for specificly the first question.

 

Comment: I know that there is the possiblity to get the site script of the sharepoint site, but since the template sharepoint was simply created with the default empty template, this doesn't realy reduce the amount of scripting.

 

 

2 Replies
best response confirmed by JGeistler (Copper Contributor)
Just cross-read it and this sounds indeed like a good option. I will test this and get back if it solved my issue, but either way thank you very much.
1 best response

Accepted Solutions
best response confirmed by JGeistler (Copper Contributor)