Do PnP Site Templates support copying files in document libraries? #919
-
I created an out of the box document library, added a few files and ran the PowerShell below. The unzipped schema.pnp file does not contain any of the files in the document library. I also receive an error when running the Invoke-PnpSiteTemplate cmdlet. Error: Invoke-PnPSiteTemplate : Input string was not in a correct format. Get-PnPSiteTemplate -Out $listSchmaXMLPath -Handlers Lists -ListsToExtract "TestLibrary" Is this a bug or an unsupported action? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Add-PnPDataRowsToSiteTemplate is, as far as I know, intented to add listitems to the template, not files. This might also explain why you get the error when applying the template to the site. |
Beta Was this translation helpful? Give feedback.
Add-PnPDataRowsToSiteTemplate is, as far as I know, intented to add listitems to the template, not files. This might also explain why you get the error when applying the template to the site.
Add-PnPFileToProvisioningTemplate might do the trick :-)