Forum Discussion
jrmcloughlin
Feb 05, 2020Copper Contributor
Get-PnPListItem Value cannot be null
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 Document...
Carlos_Marins
Feb 07, 2020Iron Contributor
Hi jrmcloughlin ,
So, making a quick search all I could find was this https://sharepoint.stackexchange.com/questions/254766/sp2013-value-cannot-be-null-error-for-version-history-on-a-single-document 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