To view a list of all groups and user memberships for a certain SharePoint 2010 site collection try this PowerShell script. Be sure to change the name of the SharePoint site in the script under the $site variable.


[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$site = New-Object Microsoft.SharePoint.SPSite("http://server/sites/sitecollectionname")
$groups = $site.RootWeb.sitegroups
foreach ($mygroup in $groups)
{
"Group: " + $mygroup.name;
foreach ($user in $mygroup.users)
{
" User: " + $user.name
}
}
$site.Dispose()