Introduction
Microsoft has introduced many modern ways to customize or write SharePoint solutions instead of a feature-based framework.
There are various approaches to plan and automate the process for site creation and management of SharePoint online sites.
Site template creation is one of the best features provided by Microsoft in SharePoint sites to create new sites with a similar structure for better SharePoint development for on-premise.
In-Office 365 the newest capability to create SharePoint sites based on a template has been rolled out. Once new SharePoint sites are created, site designs and site scripts automatically apply the custom configuration. It is fully integrated into the SharePoint UI and offers an alternative to the PnP provisioning engine.
PnP is an open-source project maintained by Microsoft and the community has come up with new features called PnP provisioning templates to provision the sites in SharePoint Online. It's a very nice feature with vast capabilities but requires more effort, even if you want very few configurations.
Microsoft has introduced Site Design & Site Scripts along with PnP provisioning templates to support custom configurations with less effort than PnP provisioning templates. Currently, only SharePoint online supports Site Designs and Site Scripts.
In this article, we'll look at PnP provisioning PowerShell, Site Scripts, and how to use what is given by PnP PowerShell and what isn't supported with the best possible approach.
PnP Provisioning PowerShell is an excellent way to automate the creation of SharePoint assets using PowerShell, using an XML Or PnP template file. Similarly, Site Scripts and Site Design-assist us to create a site using JSON templates and allow you to call any automation scripts or use a template for a custom implementation
Site designs
Site Design is a predefined set of actions that can be used in SharePoint online to create new sites using the modern UI. It will help you have consistency within the same tenant across multiple site collections. For example, you can create new lists/libraries, site/list columns, types of content, set themes, set the site logo, etc. we can apply Site Design to existing sites using PnP PowerShell scripts. Site Designs are basically a package of scripts that runs in the background when you select a design to create a new site.
Understanding Site Scripts
Create a SharePoint Modern Team site to be used as a template and generate a provisioning template from PnP PowerShell it.
PnP is a community-sponsored, open-source project, not Microsoft. Now Microsoft has brought its own gadget to the soccer field on the provisioning site. It supports flow triggering but it includes far fewer functions than PnP in terms of provisioning.
The schema of the site script is not difficult to comprehend since it is based on a JSON structure that works with a list of actions.
Each action is specified by a verb value that must be correctly written since it is treated as case-sensitive values.
Below is a list of the actions supported,
- applyTheme: Applies a custom theme
- setSiteExternalSharingCapability: Manages guest access
- createSPList: Creates a new list
- addNavLink: Adds a navigation link
- triggerFlow: Triggers a Microsoft flow
- setSiteLogo: Sets a logo to a communication site (Not supported in team sites)
- joinHubSite: Joins a hub site
- With more to come next action support road map :
- Create modern pages; set as home page
- Add declarative formatting to a column
- Join site to Hub
- Enable external access
- Set site classification




Join the conversation! Your thoughts help the community grow.