Forum Discussion

Guillaume Delignieres's avatar
Guillaume Delignieres
Copper Contributor
Jul 06, 2017

Add-PnPDataRowsToProvisioningTemplate : Object reference not set to an instance of an object

I have been trying to extract data using the new PnP command

Add-PnPDataRowsToProvisioningTemplate

But I am getting a null reference exception:

 

 

Add-PnPDataRowsToProvisioningTemplate : Object reference not set to an instance of an object.
At line:1 char:1
+ Add-PnPDataRowsToProvisioningTemplate -Path PathToFile ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Add-PnPDataRowsToProvisioningTemplate], NullReferenceException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Provisioning.AddDataRowsToProvisioningTemplate

 

It does not give any useful information.
Here is what I tried with always the same result :

 

Connect-PnPOnline -Url http://sharepointSite
Add-PnPDataRowsToProvisioningTemplate -Path PathToExistingFile
-List Lists/SimpleEmailTemplates -Query '<View></View>' -Fields 'Title'


Or

Connect-PnPOnline -Url http://sharepointSite
Add-PnPDataRowsToProvisioningTemplate -Path PathToExistingFile
-List SimpleEmailTemplates -Query '<View></View>' -Fields 'Title'

Or

Connect-PnPOnline -Url http://sharepointSite
Add-PnPDataRowsToProvisioningTemplate -Path PathToExistingFile
-List SimpleEmailTemplates -Query ""

Not sure what is wrong here. Am I using the command incorrectly ?

No RepliesBe the first to reply

Resources