Skip to content
Spencer Varney edited this page Jan 25, 2015 · 2 revisions

#GAGroupMember

The basic GAGroupMember is similar to GAUserAlias in that it is the default object returned by Google without any particularly special properties or methods.

#GAMultiGroupMemberList In the event that you should be getting Group Members from more than one group at a time using Get-GAGroupMember -All, you will be given a GAMultiGroupMemberList. This object type contains a property called membersByGroup which is exactly what it sounds like - a sorted list of all the GroupMembers of all the participating groups, sorted on the groups. Since it's a list, you can then access a group by calling the index:

$AllGMs.membersByGroup[0]

From there you can further drill down to that object's own memberList property, and you'll see basically what you'd have seen if you got the results for just that one group.

But all of that would be silly to do when there is a provided method to just get the members for the group you want, useful when you have a ton of groups! (You'll need to provide the full group email address.)

$AllGMs.GetGroupMembers("[email protected]")

Alternately, you can call on the ToSingleList() method which will return all of the GroupMember objects in one big list.

Finally, you can use the GetMemberCount() method to get a count of all members for all groups.

Clone this wiki locally