Google Apps gsync wanted to remove all the members of a particular group, lets call it FailingGroupName
even though ADUC GUI lists a long list of members.
Get-AdGroup FailingGroupName -Properties *
returns .member, .memberOf, and members.
The working groups have entries in both .member and .members.
The non-working group FailingGroupName has no entries in .member.
Get-AdGroupMember FailingGroupName
returns all the members of the group.
Should i just set $FailingGroup.member = $FailingGroup.members?
This is the side effect of changing the "Primary Group" of the user to one of the other groups besides "Domain Users." Actually, it is the effect of changing the "Primary Group" to the current group being enumerated. Setting the primary group back to normal fixes it.