Get-PnPListItem error: Get-PnPListItem : Could not find file 'PnP.Framework.resources'.
See original GitHub issueHello everybody,
I have a classic SharePoint site with more than 17,000 pages. These pages are in “Pages” library. There are some folders in Pages library. I want to get the pages in a specific folder. I used this query for retrieving the pages:
$Query = <View Scope='RecursiveAll'><Query><Where><Contains><FieldRef Name='FileRef' /><Value Type='Text'>Folder1</Value></Contains></Where><OrderBy><FieldRef Name='ID' Ascending='TRUE' /></OrderBy</Query><RowLimit>1000</RowLimit></View>
And this command:
Get-PnPListItem -List Pages -Query $Query
But I received this error:
Get-PnPListItem : Could not find file ‘PnP.Framework.resources’. At line:1 char:1
- Get-PnPListItem -List Pages -Query $Query
-
+ CategoryInfo : WriteError: (:) [Get-PnPListItem], FileNotFoundException + FullyQualifiedErrorId : EXCEPTION,PnP.PowerShell.Commands.Lists.GetListItem
I tried this commands on the other site with less pages and worked perfectly. Do you guys have any idea about this issue?
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top GitHub Comments
It looks like the exception handler is referencing a resource file that no longer exists. The code is trying to display an error message from the resource file, but fails. To see where the code is failing use Get-PnPException, at least until someone fixes the resource references.
I am also getting this error message when trying to ConvertTo -PnPPage -Identity $PageName -AddPageAcceptBanner. I am migrating SP 2013 to SP 2019 Subscription Edition, using Modern pages. Can anyone tell me why I’m getting this error and/or how to resolve it?