Exploring SharePoint Users, Groups, and Security Using PowerShell
Here's a quick little PowerShell script to list all groups and all users. Note that if an AD group is listed as a user, all the users in that group may not show up in this list until the user has visited SharePoint at least once. For both SharePoint 2007 or 2010 in any PowerShell: [System.Reflection.Assembly]::LoadWithPartialName( "Microsoft.SharePoint" ) $site = New-Object Microsoft.SharePoint.SPSite( "http://yourservername/sites/yoursitecollection " ) $groups = $site.RootWeb.sitegroups foreach ($grp in $groups) { "Group: " + $grp.name; foreach ($user in $grp.users) { " User: " + $user.name} } $site.Dispose() or for SharePoint 2010 in the SharePoint 2010 Management Shell: $site = Get-SPSite http: //yourservername/sites/yoursitecollection $groups = $site.RootWeb.sitegroups foreach ($grp in $groups) { "Group: " + $grp.name; foreach ($user in $grp.users) { " User: " + $user.name} } $site.Dispo...