I have tried many queries, but this gets me my OU:
(&(objectCategory=organizationalUnit)(Name=MyOU))
(I just get the ou here)
I tried to use (&(objectCategory=organizationalUnit)(objectClass=group)(Name=MyOU))
but failed.
Also, (&(objectCategory=Group)(cn=MyOU,dc=mytop,dc=mysuffix))
and failed.
I am trying to get the groups within the OU. I have searched a lot but cannot come up with it. How do I find the groups within the OU? I have a routine that will print out the groups. I just can't get the query right.
Thank you for any help.