LDAP filter simplification

dave parker 1 Reputation point
2020-08-24T03:46:10.597+00:00

Hello, I have the following filter to select users from multiple groups.
As these groups all have the same parent OU path, is there any way I can simplify this filter to remove the need to remote the common parent path for each sub-group ?
Thank you.

(&(objectCategory=user)(|(memberOf=CN=TEST1_NAMED,OU=CONTAINER3,OU=CONTAINER2,OU=Groups,OU=myCompany,DC=myDomain)(memberOf=CN=TEST2_NAMED,OU=CONTAINER3,OU=CONTAINER2,OU=Groups,OU=myCompany,DC=myDomain)(memberOf=CN=TEST3_NAMED,OU=CONTAINER3,OU=CONTAINER2,OU=Groups,OU=myCompany,DC=myDomain)(memberOf=CN=TEST4_NAMED,OU=CONTAINER3,OU=CONTAINER2,OU=Groups,OU=myCompany,DC=myDomain)(memberOf=CN=TEST5_NAMED,OU=CONTAINER3,OU=CONTAINER2,OU=Groups,OU=myCompany,DC=myDomain)
(memberOf=CN=TEST6_NAMED,OU=CONTAINER3,OU=CONTAINER2,OU=Groups,OU=myCompany,DC=myDomain)))

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,456 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Vicky Wang 2,731 Reputation points
    2020-08-24T09:25:41.987+00:00

    Hi,
    Thank you for posting in our forum.
    According to my knowledge and understanding, you can use the script method to achieve
    I suggest that you can post on the powershell forum, they can give you more professional answers
    Hope this information can help you
    Best wishes
    Vicky

    0 comments No comments

  2. Vicky Wang 2,731 Reputation points
    2020-08-28T02:51:56.317+00:00

    Hi,
     
    Just want to confirm the current situations.
     
    Please feel free to let us know if you need further assistance.
     
    Best Regards,
    Vicky 

    0 comments No comments

  3. Vicky Wang 2,731 Reputation points
    2020-08-31T07:17:48.327+00:00

    Hi,
     
    Just want to confirm the current situations.
     
    Please feel free to let us know if you need further assistance.
     
    Best Regards,
    Vicky 

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.