SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like a SP 2010 Powershell script which searches all folders in a library and finds the ones that do not inherit permissions from their parent.

Does anyone have one handy? I'm new to the whole powershell/sharepoint idea, so not sure how to go about this yet.

Cheers, Daniel

share|improve this question
up vote 5 down vote accepted

Try this:

asnp microsoft.sharepoint.powershell
$web = Get-SPWeb "http://yoururl"
$list = $web.Lists["YourLibrary"]
$list.Folders | ft Name, HasUniqueRoleAssignments
share|improve this answer
    
perfect -thank you – Daniel Williams Jun 8 '11 at 16:50
    
We used your script successfully, but instead of "Folders" used "items" -> $list.Items | ft Name, HasUniqueRoleAssignments – user15432 Apr 15 '13 at 10:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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