0 votes

There is a script to indicated if a user is a member of any listed groups. Is it possible to have a version of the script that checks a group or member of any nested group?

Current script page: https://www.adaxes.com/script-repositor ... s-s294.htm

by (420 points)
0

Hello,

Do we understand correctly that you need the script to return true if a user is a member of any group specified in the $groupDNs variable or any of its nested groups? If that is correct, you can use the second script from the article you referenced (Return true if the target object is a member of any of the groups).

0

We are wanting to specify a group in the code, and have it check that group plus all nested groups.

1 Answer

0 votes
by (250k points)
selected by
Best answer

Hello,

That is exactly what the second script from the repository article does. You need to specify the distinguished name (DN) of the group in the $groupDNs variable. The script will return true if the user is a member of the group itself or any of its nested groups.

If you need to check membership of only one group, you can use the built-in condition If is a member of <Group>. To check membership in nested groups, make sure the Check direct members only option is not enabled.

Related questions

0 votes
1 answer

Our Help Desk currently 'mirrors' the group membership of a new user based on another existing user in our AD. I'd like to be able to automate this so that the initiator ... and 'paste' it on the new user being created. Any help on this would be appreciated!

asked Apr 21, 2020 by RayBilyk (220 points)
0 votes
1 answer

Hello, I have a web service that checks if a user is a member of a group. I am not concerned if they are a direct member or an indirect member of a group, but if the user is in the ... I pass it User A and Group 1. I am using ADSI, c# (.Net 4.0), and WCF.

asked Feb 23, 2014 by mbcalvin (140 points)
0 votes
1 answer

Currently, when I disable a user account in Adaxes, the group memberships of the user remain intact. I'd like to automate the removal of group memberships such as distribution ... a list of groups/DL that the user was previously in and removed from. Thanks!

asked Nov 3, 2021 by jayden.ang (20 points)
0 votes
1 answer

Hello, Is there a way to send an email notification when a user is added to a group dynamically (with LDAP filter) , it's work only when i add the user manually Thank you

asked Jun 30, 2021 by GG (70 points)
0 votes
1 answer

We are attempting to use the member property in a powershell script for all groups. We get this error message on certain groups that are used as "primary". If we set another ... just shows the single member in the group in which the group is not the primary.

asked Feb 19, 2020 by mark.it.admin (2.3k points)
3,064 questions
2,777 answers
7,134 comments
430,438 users