Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am looking for a PowerShell command to get the permissions of a SharePoint group on a securable object.
I have googled for a while but without success.

I am aware of the GetUserEffectivePermissionInfo method offered by the SPSecurableObject.
But this method only gives permissions of a user.

Any help will be greatly appreciated

share|improve this question

1 Answer 1

I don't have one that takes a specific object as input, but this may help. It will list out the role assignments on web, list, items for users and SharePoint groups.

Start-SPAssignment -global    
$sites = Get-SPsite -limit All

    foreach ($site in $sites)
    {
        foreach ($web in $site.allwebs)
        {
            Write-Host -BackgroundColor green -ForegroundColor white $web.url
            $web.RoleAssignments

            foreach ($list in $web.lists)
            {
               If ($list.HasUniqueRoleAssignments)
               {
                    Write-Host -BackgroundColor yellow -ForegroundColor black $list.Title
                    $list.RoleAssignments

                    foreach ($item in $list.Items)
                    {
                        If ($item.HasUniqueRoleAssignments)
                        {
                            Write-Host -BackgroundColor red -ForegroundColor yellow $item.UniqueId
                            $item.RoleAssignments
                        }
                    }
               }
            }
        }
    }
Stop-SPAssignment -global
share|improve this answer

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.