There are many document libraries in in sites instead of going each document library how can I write PowerShell to Break Permission Inheritance for all document libraries in a Site ,

1 Answer 1


This works for me (tested in SP 2013):

Add-PSSnapin Microsoft.SharePoint.PowerShell –ErrorAction SilentlyContinue

$site=Get-SPSite "http://webSPapplication.com/sites/helloSite"

$library=$site.RootWeb.Lists | where {$_.Title -eq $libraryName  }


#keep all existing permissions and Item level permissions


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.