Forum Discussion

Khalid Hajjouji's avatar
Khalid Hajjouji
Copper Contributor
Oct 25, 2018

SharePoint 2016/PnP powershell: how to get page content?

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.