LDAP filter on DistinguishedName - wildcards don't work

Discussion in 'Scripting' started by ASGMikeG, Oct 30, 2006.

  1. ASGMikeG

    ASGMikeG Guest

    I'm trying to select only AD users whose distinguishedName contaings the
    word 'General' i.e. *General*.

    Sample DN:
    CN=Michael Green,OU=General,OU=SYDNEY,OU=ASGGroup

    I have the following LDAP based User filter working :

    However when I add:
    to this the filter returns nothing.

    Can anyone offer some guidance ?

    ASGMikeG, Oct 30, 2006
    1. Advertisements

  2. Sorry, wild cards are not allowed in DN attributes like distinguishedName,
    member, or memberOf. You must specify the full Distinguished Name in the

    The only solution I can think of is to retrieve all users meeting the other
    criteria, then when you enumerate the collection or recordset, parse the
    Distinguished Name. Also, if you only want to consider objects in
    ou=General, make that ou the base of your search.
    Richard Mueller, Oct 31, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.