I'm attempting to write a PowerShell script for SharePoint 2010 on my development farm.
With this script, I would like to retrieve a list of anyone who is in a "Members" group.
So for instance, each site has a "members" group, usually named after the site:
Site Name is "HR", then the group would be "HR Members".
Site Name is "PR", then the group would be "PR Members".
Site name is "Intel", then the group name would be "Intel Members".
This group naming convention is the default naming standard for groups in SharePoint, so hopefully you understand what I'm trying to explain ;-)
The script is attached, and right now it doesn't display anything due to my group name being wrong...I'm just not certain of how to search for PART of a group name (putting a * in front of Members didn't work, so I'm assuming it's a bit more complex).
This way, I can get a list of all users who are in any group that has the word "Developers" in it, whether it is "SharePoint.Developers", "SharePoint Developers", "Sharepoint-Developers", or "Sharepoint_developers".
Does anyone see how this might be done?