2

There was a tool for Broken inheritance reporting in the "SharePoint Administrator Toolkit" for SP2007 by Microsoft, info here, but I can't find something similar in 2010.

What I am really looking for is to find out what "Limited Access" means on a specific site, but as there has been a tool for Broken inheritance reports in SharePoint 2007 I thought it would be a easier way to go.

0

Okay, so if you need to focus on one SPWeb at a a time, use the following minor modification of the script from TechNet Gallery:

This script should be executed using a SharePoint 2010 Management Shell on one of the SharePoint servers in the farm with an account allowed to access all content. That means you must be added to database roles by the Add-SPShellAdmin cmdlet.

param($url = "") 
Function ReadWebPermissionInheritance($web) 
{ 
    foreach ($subweb in $web.Webs) 
    { 
         ReadWebPermissionInheritance($subweb) 
    } 
    foreach ($list in $web.Lists) 
    { 
          ReadListPermissionInheritance($list) 
    } 
    if ($web.HasUniqueRoleAssignments) 
    { 
        Write-Host "inheritance broken on WEB:" $web.Url   
    } 
} 
Function ReadListPermissionInheritance($list) 
{ 
    #read list items => files 
    foreach($item in $list.Items) 
    { 
        if ($item.HasUniqueRoleAssignments) 
        { 
            Write-Host "WEB:" $list.ParentWebUrl "- LIST:" $list.Title " - inheritance broken on LISTITEM:" $item.Url 
        } 
    } 

    #read list folders => folders 
    foreach ($folder in $list.Folders) {  
        if ($folder.HasUniqueRoleAssignments) 
        { 
            Write-Host "WEB:" $list.ParentWebUrl "- LIST:" $list.Title " - inheritance broken on LISTFOLDER:" $folder.Url 
        } 
    } 
    #read the list itself 
    if ($list.HasUniqueRoleAssignments) 
    { 
        Write-Host "WEB:" $list.ParentWebUrl "- inheritance broken on LIST:" $list.Title    
    } 
} 


if ($url -eq "")  
{  
    Write-Warning "Please specify a site collection" 
    Write-Host "Usage: ./Find-BrokenInheritance.ps1 -url http://portal.contoso.com" 
    exit 
} 

#$siteCollection = Get-SPSite $url 

#$WebApp = $siteCollection.WebApplication 
#foreach ($Site in $WebApp.Sites) 
#{ 
  $allwebs = (Get-SPSite $url).AllWebs
  foreach($spWeb in $allwebs) 
  { 
    if (!$spWeb.IsRootWeb)   
    {     
        ReadWebPermissionInheritance($spWeb) 
    } 
  }     

#} 

Source: https://gallery.technet.microsoft.com/office/Find-Broken-Inhertitance-be991a85

2

The powershell script below allows for enumeration through a SharePoint 2010 web application to identify all sites, document libraries, lists, folders and items for which the permission inheritance has been broken.

This script should be executes using a SharePoint 2010 Management Shell on one of the SharePoint servers in the farm with an account allowed to access all content.

param($url = "") 
Function ReadWebPermissionInheritance($web) 
{ 
    foreach ($subweb in $web.Webs) 
    { 
         ReadWebPermissionInheritance($subweb) 
    } 
    foreach ($list in $web.Lists) 
    { 
          ReadListPermissionInheritance($list) 
    } 
    if ($web.HasUniqueRoleAssignments) 
    { 
        Write-Host "inheritance broken on WEB:" $web.Url   
    } 
} 
Function ReadListPermissionInheritance($list) 
{ 
    #read list items => files 
    foreach($item in $list.Items) 
    { 
        if ($item.HasUniqueRoleAssignments) 
        { 
            Write-Host "WEB:" $list.ParentWebUrl "- LIST:" $list.Title " - inheritance broken on LISTITEM:" $item.Url 
        } 
    } 

    #read list folders => folders 
    foreach ($folder in $list.Folders) {  
        if ($folder.HasUniqueRoleAssignments) 
        { 
            Write-Host "WEB:" $list.ParentWebUrl "- LIST:" $list.Title " - inheritance broken on LISTFOLDER:" $folder.Url 
        } 
    } 
    #read the list itself 
    if ($list.HasUniqueRoleAssignments) 
    { 
        Write-Host "WEB:" $list.ParentWebUrl "- inheritance broken on LIST:" $list.Title    
    } 
} 


if ($url -eq "")  
{  
    Write-Warning "Please specify a site collection" 
    Write-Host "Usage: ./Find-BrokenInheritance.ps1 -url http://portal.contoso.com" 
    exit 
} 

$siteCollection = Get-SPSite $url 

$WebApp = $siteCollection.WebApplication 
foreach ($Site in $WebApp.Sites) 
{ 
  foreach($spWeb in $Site.AllWebs) 
  { 
    if (!$spWeb.IsRootWeb)   
    {     
        ReadWebPermissionInheritance($spWeb) 
    } 
  }     

} 

Source: https://gallery.technet.microsoft.com/office/Find-Broken-Inhertitance-be991a85

Check this for limited access

  • Thank you for your reply, I will try this script tomorrow. – Rasmus Oct 21 '14 at 14:59
  • I just tried it out but got this error: pastebin.com/bYd578y9, any idea why? – Rasmus Oct 22 '14 at 7:34
  • Do you have permissions to access the content database? Does Get-SPWeb http://dev2010 return an object or throw an error? – Alexey Krasheninnikov Oct 22 '14 at 8:03
  • Yeah, Get-SPWeb works @AlexeyKrasheninnikov – Rasmus Oct 22 '14 at 8:45
  • Then try to avoid iterating all SPSites in the Web Application and focus on a single SPSite. Do you need help making that change in the script? – Alexey Krasheninnikov Oct 22 '14 at 8:46
0

Out of the box, SharePoint 2010 includes the Check Permissions tool instead. It shows you the memberships of the chosen user and then you can use View Group Permissions for a specific group. However, there's no tool to list all individual permissions down in the hierarchy, so use some powershell in case you need such a report.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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