Forum Discussion

Pavel2235's avatar
Pavel2235
Brass Contributor
Sep 12, 2023

List items don't copy when I use PnP Provisioning Engine

Hi! I've a PowerShell script to get template from TestSite2 and invoke this template on TestSite3.  I use config.json to get only list "testlist" template from TestSite2. { "$schema":"https://a...
  • SvenSieverding's avatar
    SvenSieverding
    Sep 14, 2023

    Hi Pavel2235 ,

    I recently had issues like that.
    It seems like this: If you export list elements using the config file, then ALL properties of all fields are exported as datavalues... in order to import these items I had to remove the datavalues for "ContentType" and other internal columns. Then  an import worked.

    Btw: If you export a site template like this

     

    Get-PnPSiteTemplate list.xml -Handlers Lists -ListsToExtract "MyList"
    Add-PnPDataRowsToSiteTemplate -Path .\list.xml -List "MyList"

     

    then you don't get datavalue elements for internal columns (But that does not work well for files and attachmetns)

    Best Regards,
    Sven

Resources