Hello,
I'm getting a list of groups that a user belongs too.
I don't want "Domain users" or "users" as part of the array. I have tried this scenario below to remove with no luck.
What is the best way to accomplish this removal?
[System.Collections.ArrayList]$ListArray2 = GetGroups $user
$listarray2.Remove("CN=Domain Users,CN=Builtin,DC=hteeter,DC=ht")
$listarray2.Remove("Users")
$ADGroups=$listarray2