I have a document library with many folders, sub-folders and files inside. Many of the folders/sub-folders/files have unique permission set to them.

I need to find a way, using PowerShell script probably, to loop through all the folders/sub-folder/files under the particular Document Library, and return me a text file reporting with the names of folders, types of the permissions (unique or inherited) and the user names who have access to the listed item.

Could you kindly help me to figure out how to achieve such result?

Thanks in advance for any help.

  • SharePoint Online or SharePoint On-Prem? Do you have site collection admin privileges
    – Tanmay
    Commented Jan 30, 2017 at 14:15
  • SharePoint 2013 Foundation (On-Prem) I have access to the server and have all necessary permissions
    – egurb
    Commented Jan 30, 2017 at 14:19

1 Answer 1


This is a good starting point Link

You might want to remove the part where it looks for all webs (if you know which web you are looking for) Lines 253-259

 Write-Host "Querying Number of webs " $rootWeb.Webs.Count ;  
 foreach($web in $rootWeb.Webs)
   $Permissions +=  (QueryUniquePermissions $web);
   Write-Host "Web :  "  $web.Title "Count" $Permissions.Count
  • Thanks for the response, I'll check little later and let you know whether that helped.
    – egurb
    Commented Jan 30, 2017 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.