The method which runs this search receives the distinguishedName as a parameter. This distinguishedName specifies from which place to start the search. The problem is that I receive all the OUs below the OU stated at the distinguishedName but I also receive the OU of the distinguishedName itself. I would like to remove this OU from the results and for that I assume I need to add to the filter a requirement that distinguishedName != to the distinguishedName I receive as parameter. I tried few variations of the condition yet with no success. Can someone please help me correct this filter so it will match my requirement ?