Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Nested group function not returning nested AD group members past 1st and 2nd level.

$
0
0

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


Viewing all articles
Browse latest Browse all 6937

Trending Articles