none
Get permission levels of a SharePoint Group using powershell script ? RRS feed

  • Question

  • Hi,

    How to write powershell script to get all permission levels assigned to a SharePoint group in a Site?

    Example : Group Name : XYZ group , Permissions : Full Control, Design, ......

    Please help !

    Thanks

    -Sam


    Samarendra Swain Team Sharepoint http://www.mahindrasatyam.com/

    Thursday, January 10, 2013 9:47 AM

Answers

  • I succeed with below script. Thanks to me.

    #$path = get-location
    $sites = get-spsite "http://SP2010/site/sam/"
    foreach ($site in $sites)
     {

        write-host -foregroundcolor green "Working on Site Collection: "$site.RootWeb.Title "..."
        foreach ($web in $site.AllWebs)
         {
          foreach($roleAssignment in $web.RoleAssignments)
          {
     write-host -foregroundcolor green "Group Name: "$roleAssignment.Member.Name "..."

               foreach($roleDefinition in $roleAssignment.RoleDefinitionBindings)
                    {
                        write-host -foregroundcolor red "Permission Name: "$roleDefinition.Name "..."
                    }

          }
        
         }
          $web.Dispose()
     }


    $site.Dispose()


    Samarendra Swain Team Sharepoint http://www.mahindrasatyam.com/

    Thursday, January 10, 2013 10:33 AM

All replies

  • Hi,

    http://sp2010userperm.codeplex.com/

    http://www.synergyonline.com/blog/Lists/Posts/Post.aspx?ID=162

    thx


    iffi

    Thursday, January 10, 2013 10:12 AM
  • I succeed with below script. Thanks to me.

    #$path = get-location
    $sites = get-spsite "http://SP2010/site/sam/"
    foreach ($site in $sites)
     {

        write-host -foregroundcolor green "Working on Site Collection: "$site.RootWeb.Title "..."
        foreach ($web in $site.AllWebs)
         {
          foreach($roleAssignment in $web.RoleAssignments)
          {
     write-host -foregroundcolor green "Group Name: "$roleAssignment.Member.Name "..."

               foreach($roleDefinition in $roleAssignment.RoleDefinitionBindings)
                    {
                        write-host -foregroundcolor red "Permission Name: "$roleDefinition.Name "..."
                    }

          }
        
         }
          $web.Dispose()
     }


    $site.Dispose()


    Samarendra Swain Team Sharepoint http://www.mahindrasatyam.com/

    Thursday, January 10, 2013 10:33 AM
  • Thx.  It helped me with my issue as well.
    Tuesday, August 13, 2013 4:38 PM
  • Works Just great !!! Thanks.
    Thursday, November 7, 2013 7:38 PM