I have this function that is not returning nested group membership past the 1st and 2nd level.
I have nested groups that are 3-4 levels deep for some users.
Do you know if this is a limitation? Is there a way around it?
________________________________________________
function GetGroups ($object)
{
Get-ADPrincipalGroupMembership $object | ForEach `
{
$_
Get-ADPrincipalGroupMembership $_
}
GetGroups $user | select name -Unique # execute function