Get-PnPFolderItem doesnt returns anything with PnP.Powershell module

SAURAV KUMAR 5 Reputation points
2023-06-09T09:53:42.9766667+00:00

Get-PnPFolderItem doesnt returns anything with PnP.Powershell module

Windows for business | Windows Server | User experience | PowerShell
{count} vote

1 answer

Sort by: Most helpful
  1. Limitless Technology 45,181 Reputation points
    2023-06-12T15:27:37.7166667+00:00

    Hello

    Thank you for your question and reaching out.

    Please try to run below PS script from SharePoint Powershell window.


    #Observe the folder as item, and the item attribute is Folder (FileSystemObjectType -eq "Folder")

    $Folders = Get-PnPListItem -List $List -PageSize 100 -Fields FileLeafRef | Where {$_.FileSystemObjectType -eq "Folder"}


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.