Feb 05 2020 05:53 AM
I've hit an issue in a couple of document libraries when running Get-PnPListItem to retrieve all documents I get a "Value cannot be null" response:
$items = Get-PnPListItem -List "Shared Documents" -PageSize 500
Get-PnPListItem : Value cannot be null.
Parameter name: termId
At line:1 char:10
+ $items = Get-PnPListItem -PageSize 500
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (:) [Get-PnPListItem], ServerException
+ FullyQualifiedErrorId : EXCEPTION,SharePointPnP.PowerShell.Commands.Lists.GetListItem
Has anyone seen this before? IS there any way of determining what item/term is causing the error?
Feb 06 2020 11:12 AM
Hey @jrmcloughlin,
A few questions to help understand your problem:
Regards,
Feb 07 2020 12:56 AM
Thanks
Feb 07 2020 09:02 AM
Hi @jrmcloughlin ,
So, making a quick search all I could find was this question on Stack Exchange. It seems like a single item could be causing problem due to its metadata. Can you try to query a single item from this library and see if it works? Maybe by querying different items you can track it down to a single file that's causing the issue. Let me know if it helps.
Regards