Replies: 2 comments 3 replies
-
I have the same issue. I have a Site Template (i.e. Site Design) that 'contains' two site scripts. Script one adds some site columns, and script two creates some content types, populating them with some of the site columns created via script one. When I use the Invoke-SPOSiteDesign via PowerShell, it just goes to the next line but nothing happens. If I apply the site template via the UI, both site scripts execute as expected. Pretty frustrating so I wonder if anyone can pinpoint what the problem might be? |
Beta Was this translation helpful? Give feedback.
-
I think I figured it out - my site design had more than 30 actions (Invoke-SPOSiteDesign is limited to 30 actions and subactions). Simple enough workaround: Instead of using e.g.
...simply use...
This will schedule the site script to be applied. When you run it, you'll get given an ID for the scheduled task. You can check up on this by using:
...although for me, nothing was returned as, presumably, the task got fired off almost immediately, hence nothing 'scheduled' was there for reporting on. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussed in #1688
Originally posted by imsb365 March 8, 2022
I have created a custom SharePoint online site design. The design includes below actions,
Custom content type 'Intranet Page' is created in admin gallery and it should be synched from there to site.
I have written a PowerShell script that should apply above design to site and then the script updates some other settings in site and library that cannot be achieved from design template.
When I try to execute
Invoke-PnPSiteDesign -Identity $siteDesign.Id -WebUrl $siteUrl
the script just moves to next line without any error or warning, but when I refresh the site in browser design is not applied to SharePoint site. I tried it multiple times but still no luck.However if I apply the design from UI menu 'Apply a site template' the design is applied.
Is there any bug in Invoke-PnPSiteDesign? or I am missing something?
PS. I have PnP.Powershell version 1.9.0
Beta Was this translation helpful? Give feedback.
All reactions