Replies: 1 comment 13 replies
-
Are you using the Page Modernization PowerShell to create the new pages? If so, you can do a lot with the mapping files. You might be able to get everything you need done with them removing the need for the Set-PnPListItem step that is creating another version. |
Beta Was this translation helpful? Give feedback.
13 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm performing a content migration from classic SharePoint page (SharePoint Online Classic Site. Let's call it source) to Modern site pages(Let's call it destination). In the Source there are many versions so I store the result in the form of array with each item being the information of each version. So In PnP-Powershell i make use of a for loop to push data each iteration. Each iteration, I Update the properties of the Custom content Editor Webpart using Set-PnPClientSideWebPart cmdlet and update the site page columns (like modified date, modified by etc.) using Set-PnPListItem cmdlet. The real issue here is these two cmdlets are creating 2 versions in site Page i.e. if there are 5 versions in source there will be 10 versions in destination. I'm aware I can use -SystemUpdate option in Set-PnPListItem but the Modified by and date columns remains unchanged. So my ultimate requirement is in each iteration I want a new version with updated Webpart properties and modified fields set to the values passed through the PowerShell. Can I pass -SystemUpdate in Set-PnPClientSideWebPart cmdlet or something similar that prevents a new version creation?
These two lines of snippet I have been using inside a for loop
below
Please help me with this issue
P.S.: If there a solution to #2916 and #2016, then this will also be the answer to my question
Beta Was this translation helpful? Give feedback.
All reactions