powershell icon indicating copy to clipboard operation
powershell copied to clipboard

[BUG] Invoke-PnPSiteDesign appears to do nothing

Open jimmywim opened this issue 10 months ago • 3 comments

Using 2.4.0 - Fetching a valid Site Template through Get-PnPSiteDesign then trying to run it with Invoke-PnPSiteDesign does nothing.

Syntax:

 Invoke-PnPSiteDesign -WebUrl https://xxx.sharepoint.com/sites/something -Identity <Site Design ID>

It should return the outcome of the job. There is no output return at all.

The same templates invoked through the web UI work fine, they just appear to be failing through the cmdlet.

jimmywim avatar May 01 '24 14:05 jimmywim

Maybe there is something invalid in the site script that is not running well by using this commandlet. If you are just creating a new site design with the site script example provided over here https://learn.microsoft.com/en-us/sharepoint/dev/declarative-customization/site-design-overview#anatomy-of-a-site-script. With the nightly build "2.4.73" of PnP.PowerShell and the provided example this is working as expected and get the outcome on the screen.

Is the cmdlet then running fine? I understand that some feedback of what is the error with the applying the site design should be helpfull.

markgort86 avatar May 24 '24 23:05 markgort86

Any update on this @jimmywim ? Maybe you can try it with a different site design/script ?

gautamdsheth avatar May 30 '24 13:05 gautamdsheth

@gautamdsheth @markgort86 I know the root cause, the site design had more than the threshold script tasks/verbs, so had to use the REST API endpoint instead. Not sure the cleanest way to handle this in the Cmdlet though, when it current returns nothing in this scenario (not the best UX).

jimmywim avatar May 30 '24 15:05 jimmywim