Forum Discussion
Rene Wagner
Sep 07, 2021Copper Contributor
Question regarding provisioning with Get- and Apply-PnPProvisioningTemplate
Hi,
I am working on provisioning a site using the Apply-PnPProvisioningTemplate cmdlet and feeding it a PnP template generated with the cmdlet:
Get-PnPProvisioningTemplate -Out "c:\temp\PnP-NewBase-File.xml" -Handlers All -IncludeHiddenLists -IncludeSearchConfiguration -PersistPublishingFiles -IncludeAllClientSidePages
When I apply this template to a new site using Apply-PnPProvisioningTemplate it appears to be applied properly, but a few things are missing and I was wondering why? Specifically:
- In the source template site I added a number of components to the \SiteAssets library, specifically some images and a couple of JS script files (stored in separate folders). Of these only one of the images was included in the generated template (they are all referenced when I generate an XML template file) and deployed to the target site (the home page site image in the upper left). Why is that? Should these not all be part of the template definition when I generate my template? Is there a special way these have to be handled to be included?
- I also have some custom display templates stored in the Master Page Gallery and none of these are getting included in new provisioned site. How should these be handled?
- Is there documentation anywhere as to what is/should be/is not included in a PnP-generated template, and how to handle items that are not included?
Any assistance would be appreciated.
Thanks
- Rene WagnerCopper ContributorOne update -- for the Display Templates it appears the .JS script files are referenced in the template, but the corresponding HTML files (which I added to the MPG and which triggered generation of the .JS files) are not getting picked up.