Apply-PnPProvisioningTemplate restore data from wrong list

Occasional Contributor

I'm using the latest release of PnP PowerShell for SharePoint Online.
I'm also creating a Provisioning Template using this command:


Get-PnPProvisioningTemplate -Out "C:\templates\mylist.pnp" -ListsToExtract "ListName" -Connection $sourceConnection


This command creates a .pnp file correctly.

Then I'm trying to restore template to another SharePoint site with this command:


Apply-PnPProvisioningTemplate -Path "C:\templates\mylist.pnp" -ClearNavigation -Connection $targetConnection


Here's where happen a weird thing: the list is created with correct name, but columns and data in it are from another list (that is in the parent SharePoint site and that was not extracted before). So at the and the command fails with an error. The other weird thing is that I'm not using commands to add data to .pnp file.


I've also tried creating a .xml file.


Is a known issue with this command or am I doing something wrong?

0 Replies