Invoke-PnPSiteTemplate with config file not copying content/documents #2868
Replies: 3 comments
-
Anyone have any thoughts on this? I"ve been stumped for weeks now on why it won't copy documents over. |
Beta Was this translation helpful? Give feedback.
-
I assume that this isn't your full configuration file as it isn't syntactically correct. Regarding the navigation nodes, what does your "pnp:Navigation" node look like. This setting adds "RemoveExistingNodes" property so that when the template is applied to a new site, the existing navigation on that site is replaced with that in the template. I am not sure the intent of the functionality is to download document libraries though. From reading (https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/configuring-the-pnp-provisioning-engine), it looks like it is aimed at list items and attachments to those.... |
Beta Was this translation helpful? Give feedback.
-
Thank you. I hate when a simple syntax issue like that ends up being the problem. The extraction and implementation of the templates now includes the content in the lists. I have some other issues now, but the issue I originally posted about was just cause of the extra comma.
[k Trip Inc.]<https://www.kwiktrip.com/>
[ebook Icon]<https://www.facebook.com/KwikTrip/> [tter Icon] <https://www.twitter.com/KwikTrip/> [tagram Icon] <https://www.instagram.com/KwikTrip/> [pchat Icon] <https://www.snapchat.com/add/KwikTrip/> [tube Icon] <https://www.youtube.com/user/KwikTripKwikStar/>
Mission Statement: "To serve our customers and community more effectively than anyone else by treating our customers, co-workers and suppliers as we, personally, would like to be treated and to make a difference in someone's life.”
From: Nigel Bridport ***@***.***>
Sent: Monday, March 20, 2023 3:41 AM
To: pnp/powershell ***@***.***>
Cc: Tyler Borchardt ***@***.***>; Author ***@***.***>
Subject: Re: [pnp/powershell] Invoke-PnPSiteTemplate with config file not copying content/documents (Discussion #2868)
ATTENTION: This email originated from outside of Kwik Trip. Do not click links or open attachments unless you recognize the sender and know the content is safe.
I assume that this isn't your full configuration file as it isn't syntactically correct.
(You need to remove the last "," from the "lists" and add another "}")
Regarding the navigation nodes, what does your "pnp:Navigation" node look like. This setting adds "RemoveExistingNodes" property so that when the template is applied to a new site, the existing navigation on that site is replaced with that in the template.
I am not sure the intent of the functionality is to download document libraries though. From reading (https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/configuring-the-pnp-provisioning-engine), it looks like it is aimed at list items and attachments to those....
[image]<https://user-images.githubusercontent.com/11838512/226287668-acdd8ce3-de26-42cb-9726-7c7056c33ab3.png>
—
Reply to this email directly, view it on GitHub<#2868 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A54UJAVYUBEWNM7PSDEFXDDW5AJ2BANCNFSM6AAAAAAVRLQ3QI>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello GitHub Community,
I used the Get-PnPSiteTemplate cmdlet along with the JSON config file to extract a template from a site to include a couple document libraries and the documents in it. I specified in the JSON the list (verified spelling) and to include items and remove existing navigation nodes.
When I use the Invoke-PnpSiteTemplate command using the generated .pnp file, it does not copy over documents. It also doesn't remove existing nodes. What does work is copying the lists (w/o content), web parts, and navigation (w/o removing existing).
This is the code of the config file I'm using to extract. I'm extracting and applying with an account that has the SharePoint & Teams roles added. Also confirmed I had admin rights to the site the template is being applied to and an admin on the site I extracted from to create the template. I also did run the process as a global admin, but encountered the same issue. Anyone have any ideas on what I' missing to get this working correctly?
Beta Was this translation helpful? Give feedback.
All reactions