Ravi R

Ravi R

  • NA
  • 4
  • 635

SharePoint 2016 PowerShell Add SPFx web part to the Page

Jan 2 2020 6:49 AM
I am migrating the web parts from the SharePoint 2010 to the SharePoint 2016 with the SPFx. I am creating the PowerShell script which will add the web part (of SPFx type) to the web part page(of sitepages) template.
 
I am trying to use the SharePoint PNP to achive this but it asks for the connection. Do any one have the idea to achieve this. 
 
Command i am using is:
Add-PnPWebPartToWebPartPage -ServerRelativePageUrl "{ServerRelativeUrl}" -Path "{Local Path of the .webpart file}" -ZoneId "Header" -ZoneIndex 0
 
 
 
Any help would be appriciated.
 
Thanks,
Ravi 
 

Answers (1)