Site Design that can run Apply-PnPProvisioningTemplate?

New Contributor

Trying to setup easy process for client to rollout Sharepoint sites using GUI 'Site Designs' feature. General task I am trying to accomplish is this: Want to make custom Site Design where sitescripts can apply branding, HUB association, Theme, etc. Then want the custom site design to apply a PnP Provisioning Template (which would be an already uploaded .pnp file), which would build out the footer links, create a templated home page, and even upload some image assets.

I have created a ton of custom site designs and also have a good process for creating and then applying the .pnp file. Separately, these work fine. The issue, however, is to create the 'content' side of this '2 part' rollout site. The site design portion is very user friendly and would give the client an easy (infallible) way to quickly make a new communications site with everything they want. In order to include the pre-configured home page or the footer links they want standardized, though, I need to run a PowerShell command to 'apply-pnpprovisioningtemplate', and I would like to be able to 'run this command' automatically with the site design.

I am not a PowerShell expert, but have some ideas that I am literally pulling out of thin air that I wanted to see if had any merit?

Through an additional sitescript in the site design, is there a way to run PnP cmdlets (similar to a .ps1 file) where it could run the 'Connect-PnPOnline' cmd & 'Apply-PnPProvisioningTemplate'?

We have no Azure hosting plan so can't use that, but could something be done with PowerAutomate?

1 Reply
Only via Azure. Power Automate cannot execute those PnP Powershell commands.

Personal recommendation is to make the case for setting up an Azure subscription. Azure Functions and the storage for this, will be extremely cost effective. If your customer sees value in having functionality like this, the tiny cost is worth it.