Is there a way of getting all of the site pages using Get-PnPProvisioningTemplate ?

%3CLINGO-SUB%20id%3D%22lingo-sub-160649%22%20slang%3D%22en-US%22%3EIs%20there%20a%20way%20of%20getting%20all%20of%20the%20site%20pages%20using%20Get-PnPProvisioningTemplate%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-160649%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIS%20there%20a%20way%20of%20getting%20all%20of%20the%20site%20pages%20within%20a%20site%20using%20Get-PnPProvisioningTemplate%20and%20storing%20them%20in%20a%20ProvisioningTemplate%20%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECurrently%2C%20only%20the%20home%20page%20is%20extracted%20from%20a%20site.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThanks%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-160649%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPnP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-162628%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20a%20way%20of%20getting%20all%20of%20the%20site%20pages%20using%20Get-PnPProvisioningTemplate%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-162628%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20am%20told%20it%20should%20work%20fine%20as%20applying%20the%20templates%20is%20cumulative.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-161293%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20a%20way%20of%20getting%20all%20of%20the%20site%20pages%20using%20Get-PnPProvisioningTemplate%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-161293%22%20slang%3D%22en-US%22%3E%3CP%3EHI%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20I%20Apply%20two%20templates%20to%20the%20same%20Site%2C%20the%20only%20difference%20between%20the%20two%20templates%20being%20the%20ClientSidePages%20section%20would%20this%20work%20%3F%26nbsp%3B%40BertJansen%26nbsp%3B%40VesaJuvenon%20%40ErwinVanHunen%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-161121%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20a%20way%20of%20getting%20all%20of%20the%20site%20pages%20using%20Get-PnPProvisioningTemplate%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-161121%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20Paul%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20saw%20that%20post%20and%20I%20checked%20that%20scripting%20was%20switched%20on%20as%20per%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%20's%20post.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ERegards%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-160674%22%20slang%3D%22en-US%22%3ERe%3A%20Is%20there%20a%20way%20of%20getting%20all%20of%20the%20site%20pages%20using%20Get-PnPProvisioningTemplate%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-160674%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Nigel%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20few%20weeks%20back%20I%20saw%20a%20powershell%20script%20from%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F2387%22%20target%3D%22_blank%22%3E%40Pieter%20Veenstra%3C%2FA%3E%26nbsp%3Bwhich%20was%20able%20to%20extract%20the%20pages.%3C%2FP%3E%0A%3CP%3Eit%20refers%20to%20this%20post%20i%20thought%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fveenstra.me.uk%2F2017%2F03%2F23%2Foffice-365-pnp-replicating-sharepoint-based-intranets-pages-are-not-replicated%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fveenstra.me.uk%2F2017%2F03%2F23%2Foffice-365-pnp-replicating-sharepoint-based-intranets-pages-are-not-replicated%2F%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ekr%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPaul%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Contributor

Hi

 

IS there a way of getting all of the site pages within a site using Get-PnPProvisioningTemplate and storing them in a ProvisioningTemplate ?

 

Currently, only the home page is extracted from a site.

 

Thanks

 

Nigel

4 Replies

Hi Nigel,

 

A few weeks back I saw a powershell script from @Pieter Veenstra which was able to extract the pages.

it refers to this post i thought https://veenstra.me.uk/2017/03/23/office-365-pnp-replicating-sharepoint-based-intranets-pages-are-no...

 

kr,

 

Paul

 

Thanks Paul

 

I saw that post and I checked that scripting was switched on as per @Pieter Veenstra 's post.

 

Regards

 

Nigel

HI

 

If I Apply two templates to the same Site, the only difference between the two templates being the ClientSidePages section would this work ? @BertJansen @VesaJuvenon @ErwinVanHunen

 

Regards

 

Nigel

Hi

 

I am told it should work fine as applying the templates is cumulative.

 

Regards

 

Nigel