Skip to content

[BUG] Reolve-PnPFolder or Add-PnPFolder does not work above 5000 items in a list - list view threshold #1438

Closed
@LeonArmston

Description

@LeonArmston

Reporting an Issue or Missing Feature

Working with a large document library (5000+ items) and my code pre-creates a folder before I add files.

I have tried Resolve-PnPFolder and Add-PnpFolder and both get the following error message whenever I try to run the code "The attempted operation is prohibited becuase it exceeds the list view threshold.

To create the folder as a workaround I have to revert to pure csom

$context = Get-PnPContext
$folder =$context.Web.folders.add("ResearchDB/700E004E1219A627FFFE0000FFFE8025")
$context.ExecuteQuery()

I think the PnP folder commands do a pre check whether the folder exists and this fails when the item limit on the list is over 5000 wheras the pure csom does not do a pre-check. Wondering if anything can be done?

Thanks so much

Expected behavior

New Folder is created or existing folder is resolved

Actual behavior

image

image

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists

#Add more than 5000 items to a document library

$folderpath = "ResearchDB/700E004E1219A627FFFE0000FFFE8025"

Resolve-PnPFolder -SiteRelativePath $folderPath

#or

Add-PnPFolder -Name "700E004E1219A627FFFE0000FFFE8025" - Folder ResearchDB"

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)
1.8.0
Apologies if this has been fixed in a recent release - the client VM I'm working on will not allow me to install -PreRelease

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions