question

MDV-0525 avatar image
0 Votes"
MDV-0525 asked MDV-0525 answered

SPOSiteDesign -WebTemplate value when using Invoke-SPOSiteDesign on a classic Project WebApp site?

Problem: my Project Management team wants to roll out a series of 4 new lists to ~100 existing SharePoint sites (classic sites in Project Web App).

Approach:
1. use Get-SPOSiteScriptFromList to get the script to create and customize the list, then
2. use Add-SPOSiteScript to push the list(s) to SharePoint Online, then
3. use Add-SPOSiteDesign to collect the scripts into a Design <-- here is where the problem comes in
4. use Invoke-SPOSiteDesign to push the new Design to existing SP sites.

The problem with Add-SPOSiteDesign is that it requires a "-WebTemplate" parameter (64 for Team, 68 for Communication, 1 for Group w/o Teams... if my memory is correct). I don't want to corrupt my existing project sites by changing the site template.

is the Template value ignored during the Invoke command, since the site already exists and cannot be changed?
is the value "1" safe to use for classic sites that do not use the functionality of Teams, Groups, or Communication
Should I attempt to identify a Template value for the classic PWA sites and put that into the SiteDesign?
Is there a better option for deploying custom lists to a lot of sites other than through SiteDesign? There are 4 lists that have to be rolled out, each with specifically customized Fields and Views. For example, there is a command New-PnPList, however it only allows the OOTB list types, which means I would need to add a custom list and then add all of the customized Fields and Views anyway, so that doesn't seem better than using SiteDesign.








office-sharepoint-online
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MDV-0525 avatar image
0 Votes"
MDV-0525 answered

OK, so I think I solved my own problem:

it appears that Template is ignored when deploying a Design to a pre-existing site. I used the value "1" for each of my Designs and pushed those design to some classic Project Sites and didn't see any corruption. So, either I guessed right or the parameter is ignored for pre-existing sites.

I also found that "Invoke-SPOSiteDesign" did not work for me. I got an error message "Invoke-SPOSiteDesign : The site does not allow site designs.". I initially thought this was due to allowing/preventing custom scripts, but that did not appear to be the case. Even with DenyAddAndCustomizePages disabled, I was able to push the Design to the site using "Add-SPOSiteDesignTask". It takes a little longer and I can't seem to track the status of the job as it's deploying, but it seemed to work.

Right now I'm manually running the command to deploy the set of lists to individual sites, but it's still significantly faster than manually deploying 4 lists to each of the sites.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.