Forum Discussion

Mark Andrada's avatar
Mark Andrada
Copper Contributor
Mar 08, 2018
Solved

PnP PowerShell - Adding SPFx web part to a 'classic' page

Using PnP PowerShell, I'm able to add a  .dwp  or  .webpart  file to my page using https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/add-pnpwebparttowebpartpage?view=sharepoint-ps. ...
  • Joel Rodrigues's avatar
    Joel Rodrigues
    Mar 12, 2018

    Hi Mark Andrada,

     

    No problem, other commands will help here.

     

    Start by adding the web part to a page.

    Next, execute Get-PnPWebPart to get all the web parts on the page and identify the Id for the one you need to export as XML

    Finally, use Get-PnPWebPartXml to get the XML for the web part (passing the correct Id)

     

    Let me know if you find any problems, but it should be very easy to complete.

     

Resources