Forum Discussion
Get-PnPProvisioningTemplate and Communication Sites
I understand that the output of Get-PnPProvisioningTemplate is based on a delta between the site you are pointing it at and a default "plain-vanilla" site, but when I try to create a new XML template from a Communication site (specifying I only want Fields and ContentTypes using the -Handlers parameter), I end up with an ENORMOUS .xml file with many more fields and content types than the ones I created myself.
From the results, it looks like the cmdlet is grabbing everything in the Communication site that does not match the base site template of STS#0. Communication sites have a base site template of
Joseph Ackerman maybe try to specify the content type groups that you want to export?
Check out example 12 from documentation.
Hope this helps
Joel
- Deleted
By Default the latest versions only export what you added or changed.
- Joseph AckermanIron Contributor
Deleted wrote:
By Default the latest versions only export what you added or changed.
Only when the base site template type is STS#0 (classic team site). When I go against a new ("modern") communication site, I get the delta between one of those and a classic team site. What I want is to get the delta between an unaltered communication site and a communication site where I have made changes. In order to do that, I need the PnP PowerShell cmdlet to know what base site template to compare against.
- Joseph AckermanIron Contributor
Joel Rodrigues, thanks, I did look at that but it still gives me the entire group when perhaps I only changed one content type in the group...
Also, this does nothing for anything other than content types. I still get a bunch of fields, etc...