Announcement

Collapse
No announcement yet.

LDAP Search Filter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • LDAP Search Filter

    I'm not able to get a new query with a custom LDAP search with more than one condition to work.
    I create a new query under AD Queries, Query Type "Container/OU Contents", and create a custom LDAP Search Filter, select "Include subcontainers..." select Define for the LDAP Search Filter, select "Custom Search", Field and select Computer and then Name Starts with Value: ABC and add to Condition List, then add a second Condition (XYZ) to the list and the result is the following filter that doesn’t seem to work:
    (&(objectCategory=computer)(objectClass=computer)( cn=ABC*)(cn=XYZ*))

    If I only have one condition (e.g. ABC or XYZ) it works.
    p.s. On MSDN page referred to in help the syntax should contain or (|) like: (&(objectCategory=computer)(objectClass=computer)| (cn=ABC*)(cn=XYZ*))
    but this doesn’t work either.

  • #2
    Re: LDAP Search Filter

    Try this way:

    (&(objectCategory=computer)(objectClass=computer)( |(cn=ABC*)(cn=XYZ*)))

    Comment


    • #3
      Re: LDAP Search Filter

      Yes, this format works thank you very much

      The query isn't then correctly formed by Hyena and the MSDN format doesn't work either. Is that correct?

      Comment


      • #4
        Re: LDAP Search Filter

        Windows returns it to Hyena that way, so we have no control over that. The MSDN example is what I gave you. You just missed the extra set of ().

        Comment


        • #5
          Re: LDAP Search Filter

          Hmm ok, I actually just coped an example from http://msdn.microsoft.com/en-us/library/aa746475.aspx but this works so I'm happy.

          Comment

          Working...
          X