Introduction
Site creation is fast, modern and extensible with the help of Site Design and Site scripts. By using Site Design and Site scripts you can automate the custom configuration of sites across the enterprise.
- Custom scripting of sites through provisioning: This means creating list and libraries as part of the creation.
- Clean & consistently brand sites: Apply the modern theme or custom page design at the time of creation
- Apply site setting and call custom solution: We can have custom logic as part of site creating which would be MS Flow that can execute additional business logic.
Site Design is like a template. They can be used each time a new site is created to apply a consistent set of actions.
Site Scripts are JSON files that specify an ordered list of actions to run when creating the new site. The actions are run in the ordered listed.
Site Design “Flow”

Supported functions in Site Design creation
- Create lists/library
- Add a site navigation link
- Apply company themes
- Set a site logo
- Join a Hub site
- Trigger logic apps(using Microsoft Flow)
In this article, we are going to create a Site column, content types and use it in the list.
In Site Script, each action is represented as key and value in the JSON format.
Note
In a tenant, we can have 100 Site Scripts and 100 site designs. Site script actions are restricted to 300 actions or 100,000 characters.
In a tenant, we can have 100 Site Scripts and 100 site designs. Site script actions are restricted to 300 actions or 100,000 characters.
Using PowerShell to work with site design and site scripts
Step 1
We are going to use “SharePoint Online Management Shell” to work with Site Design creation. Download and install it.
Step 2
Follow the below instructions to connect to your tenant,
- $adminUPN="<Full Email address of the Tenant Admin account>" Example: [email protected]
- $orgName="<Name of the organization>" Example : JCC
- $userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
- Connect-SPOService -Url https://$orgName-admin.sharepoint.com -Credential $userCredential
Step 3
Create and assign the JSON that describes the new script to a variable as shown.





Join the conversation! Your thoughts help the community grow.