DEV Community

Tony Watters
Tony Watters

Posted on

3 1

How to export xml scripts from SharePoint Online with PnP PowerShell

Exporting xml script from SharePoint

First create new folder mkdir i.e. demo to house your exported xml.

Next connect to your SharePoint Online site

Connect-PnPOnline -url https://yourtenent.sharepoint.com/sites/mysite
Enter fullscreen mode Exit fullscreen mode

then run the following command to retrieve the pages xml

Get-PnPProvisioningTemplate -out C:\demo\articles.xml
Enter fullscreen mode Exit fullscreen mode

Navigate to view newly created xml file via command

explorer C:\demo\article_xml
Enter fullscreen mode Exit fullscreen mode

when you have updated your xml to your specifications run the following command to apply the edited xml to your selected site i.e. mysite

Apply-PnPProvisioningTemplate -Path C:\demo\articles_xml\
Enter fullscreen mode Exit fullscreen mode

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay