Question regarding provisioning with Get- and Apply-PnPProvisioningTemplate

%3CLINGO-SUB%20id%3D%22lingo-sub-2730593%22%20slang%3D%22en-US%22%3EQuestion%20regarding%20provisioning%20with%20Get-%20and%20Apply-PnPProvisioningTemplate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2730593%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20am%20working%20on%20provisioning%20a%20site%20using%20the%20Apply-PnPProvisioningTemplate%20cmdlet%20and%20feeding%20it%20a%20PnP%20template%20generated%20with%20the%20cmdlet%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EGet-PnPProvisioningTemplate%20-Out%20%22c%3A%5Ctemp%5CPnP-NewBase-File.xml%22%20-Handlers%20All%20-IncludeHiddenLists%20-IncludeSearchConfiguration%20-PersistPublishingFiles%20-IncludeAllClientSidePages%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20apply%20this%20template%20to%20a%20new%20site%20using%20Apply-PnPProvisioningTemplate%20it%20appears%20to%20be%20applied%20properly%2C%20but%20a%20few%20things%20are%20missing%20and%20I%20was%20wondering%20why%3F%26nbsp%3B%20Specifically%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3COL%3E%3CLI%3EIn%20the%20source%20template%20site%20I%20added%20a%20number%20of%20components%20to%20the%20%5CSiteAssets%20library%2C%20specifically%20some%20images%20and%20a%20couple%20of%20JS%20script%20files%20(stored%20in%20separate%20folders).%26nbsp%3B%20Of%20these%20only%20one%20of%20the%20images%20was%20included%20in%20the%20generated%20template%20(they%20are%20all%20referenced%20when%20I%20generate%20an%20XML%20template%20file)%20and%20deployed%20to%20the%20target%20site%20(the%20home%20page%20site%20image%20in%20the%20upper%20left).%26nbsp%3B%20Why%20is%20that%3F%20Should%20these%20not%20all%20be%20part%20of%20the%20template%20definition%20when%20I%20generate%20my%20template%3F%26nbsp%3B%20Is%20there%20a%20special%20way%20these%20have%20to%20be%20handled%20to%20be%20included%3F%3C%2FLI%3E%3CLI%3EI%20also%20have%20some%20custom%20display%20templates%20stored%20in%20the%20Master%20Page%20Gallery%20and%20none%20of%26nbsp%3B%20these%20are%20getting%20included%20in%20new%20provisioned%20site.%26nbsp%3B%20How%20should%20these%20be%20handled%3F%3C%2FLI%3E%3CLI%3EIs%20there%20documentation%20anywhere%20as%20to%20what%20is%2Fshould%20be%2Fis%20not%20included%20in%20a%20PnP-generated%20template%2C%20and%20how%20to%20handle%20items%20that%20are%20not%20included%3F%26nbsp%3B%26nbsp%3B%3C%2FLI%3E%3C%2FOL%3E%3CP%3EAny%20assistance%20would%20be%20appreciated.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2730610%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20regarding%20provisioning%20with%20Get-%20and%20Apply-PnPProvisioningTemplate%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2730610%22%20slang%3D%22en-US%22%3EOne%20update%20--%20for%20the%20Display%20Templates%20it%20appears%20the%20.JS%20script%20files%20are%20referenced%20in%20the%20template%2C%20but%20the%20corresponding%20HTML%20files%20(which%20I%20added%20to%20the%20MPG%20and%20which%20triggered%20generation%20of%20the%20.JS%20files)%20are%20not%20getting%20picked%20up.%3C%2FLINGO-BODY%3E
Occasional Contributor

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:

 

  1. 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?
  2. 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?
  3. 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

1 Reply
One 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.