You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I am using Get-PNPFolderItem, the items returned do not have ListItemAllFields data. It just shows up as an empty output. Unlike the Get-PnPFolder command, you also can't load the properties using -Includes ListItemAllFields.
Because we don't know how big each object is, the PnP cmdlets usually just pull a select few properties down for each object. While that's a drag, there is a way to get the other properties. See if using Get-PnPProperty works for you. It would look like this:
Because we don't know how big each object is, the PnP cmdlets usually just pull a select few properties down for each object. While that's a drag, there is a way to get the other properties. See if using Get-PnPProperty works for you. It would look like this:
Now when you run $a[5].ListItemAllFields it's populated.
I assume you already know about Get-PnPListItem, but I thought I'd mention it just in case.
Thank you for the suggestion! The Get-PnPProperty does indeed work, but it is slow - I have 4 million files to process, so all those milliseconds adds up. I'm not too familiar with the inner workings of PnP cmldlets, but was hoping that the ID would be included as it's required for so many other cmdlets (such as Set-PnPListItem, etc).
I'm familiar with Get-PnPListItem, but I haven't found a way to limit what it loads. I tried using the -FolderServerRelativeURL using the line below:
But whenever I do, it ignores the PageSize and the operation fails since it exceeds the list view threshold. Is there a better way to use Get-PnPListItem to isolate only certain folders on a large list?
I think CAML might be the way you need to go. Look at Get-PnPListItem examples #5 and #6 for an idea what that looks like. I had ChatGPT throw together a couple of things for me but I couldn't get it to work the way you want. I'm not a CAML expert though. You might have better luck.
Reporting an Issue or Missing Feature
When I am using
Get-PNPFolderItem
, the items returned do not haveListItemAllFields
data. It just shows up as an empty output. Unlike theGet-PnPFolder
command, you also can't load the properties using-Includes ListItemAllFields
.Related bugs:
pnp/PnP-PowerShell#2061
#2679
Expected behavior
I would expect to see the Item ID, Title and GUID populated. The Item ID is critical as that is what many PNP commands require to edit / modify files.
Actual behavior
I do not see any properties. The ID, Title, and GUID are empty.
Steps to reproduce behavior
What is the version of the Cmdlet module you are running?
2.5.0
Which operating system/environment are you running PnP PowerShell on?
The text was updated successfully, but these errors were encountered: