Invoke-SPOSiteDesign will apply the site designs and related site scripts to the current SharePoint online modern sites, per MSFT documentation. Consider a scenario where you need to create custom solutions, libraries, and lists for a specific business use case. Instead of going through the same process over and over again, you could create a site design that could be saved and then applied to new or existing SharePoint online modern sites. See the references section for additional information about the site designs and site scripts.
I want to talk about the Invoke-SPOSiteDesign action's limitations in this blog article. A SharePoint Online PowerShell module function called Invoke-SPOSiteDesign will apply pre-existing Site Design to SharePoint online sites. Although no errors are raised when executing this command, the Site Design is not being implemented. The command that was used in my scenario is shown below.
# replace the Identity and WebUrl that are associated with your parameters.
Reason
Invoke-SPOSiteDesign has a limitation: it can only run up to 30 actions. In my case, I have more than 30 actions which is why the Invoke-SPOSiteDesign is not working.
Alternatives
The alternative action that can be used in this case is to use Add-SPOSiteDesignTask. This action will schedule the site design task to run in the next couple of minutes. Most probably within 5 minutes, the actions are applied, and the site design is reflected in respective SharePoint online modern sites. Replace the parameters -SiteDesignId and -WebUrl with respect to your scenario.
If you are using the PnP PowerShell module, then use the command Add-PnPSiteDesignTask.
Note. For PnP modules, you need to save the current connection to the site in a variable and use that as a connection parameter. For more information on how to connect to the SPO site using PnP Modules, please visit the references section.
0 comments:
Post a Comment