Forum Discussion
Deleted
Mar 10, 2017Add-PnPListItem triggers an error when used with values
Hi folks, I'm new to SharePoint and developing for it so this could be a user error on my part but I'm really stuck and hope someone can help. I wrote a simple powershell script to connect to...
Mar 10, 2017
The - List parametr expects a list object.
So it is better to include this
$list = Get-PnPList -Identity $listname Add-PnPListItem -List $list -Value $itemValues
- DeletedMar 11, 2017
Pieter,
I tried your advice but it still crashes with the same error.
It doesn't look like that's the issue.
- Mar 13, 2017
Hi Deleted,
I've reproduced the error on a task list. Then I created a new custom list and I got the same issue.
Then I tried the same in a differnt tenant and it all worked fine.
The only other differnce is that I'm running PnP PowerShell froma differnt machine today. Friday I had a slightly later version of PnP. Could you try this with the March release?
- DeletedMar 15, 2017
Hi Pieter,
I get the same results with the February and March versions.
When I installed the January version the script worked as expected.
Maybe this is a bug introduced in the February update?