Oct 25 2018 04:15 AM - edited Oct 25 2018 04:46 AM
We are using SharePoint 2016. I am working alot with PnP powershell. I would like to use the command "Get-PnPProvisioningTemplate" to get the content of the welcomepage which is an publishing page. But in the xml template I dont see the page content. I have read there are some issues when you try this and you use in the connect the parameter -UseLogin. Because we are using SharePoint 2016 in combination with ADFS and MFA (Multi factor authentication) we need to use the parameter -UseLogin.
Is there another way to get the welcomepage content in xml?
I use at this moment this command:
Connect-PnPOnline -Url "https://mycompany.com" -UseWebLogin
Get-PnPProvisioningTemplate -Out "c:\mytemplate.xml"
In the xml template I see alot like: propertybag, security, columns, contenttypes, lists. But no Pages section.
Oct 25 2018 05:04 AM
Have you tried Get-PnPClientSidePage or Get-PnPWikiPageContent ?
One of them should do the trick, but if not, you can extract the XML of each web part on the page using Get-PnPWebPartXML and manually build the page XML
hope this helps
Oct 28 2018 06:04 AM
I will try it and let you know if it works.