Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Active Directory > LDAP Query AD

Reply
Thread Tools Display Modes

LDAP Query AD

 
 
Guest
Posts: n/a

 
      06-02-2010
Hi,

Can anyone help with how can I query AD for Account containing specific word
in the DisplayName. I am using Custom SSearch in AD and I have to write the
LDAP query which needs to display all accounts where DisplayName contains
test.

Display all Accounts where DisplayName contains (Test)

Sorry I'm new to LDAP and I need this to be in AD.

Thank you,


Lion

 
Reply With Quote
 
 
 
 
Florian Frommherz [MVP]
Guest
Posts: n/a

 
      06-02-2010

Howdie!

Am 02.06.2010 17:32, schrieb :
> Can anyone help with how can I query AD for Account containing specific
> word in the DisplayName. I am using Custom SSearch in AD and I have to
> write the LDAP query which needs to display all accounts where
> DisplayName contains test.
>
> Display all Accounts where DisplayName contains (Test)
>
> Sorry I'm new to LDAP and I need this to be in AD.


You'd best try that with ldp.exe and the search facility there. As a
search base, you'll choose your domain (ldap path) for example
"DC=domain,DC=com", the scope would be "Subtree" and your search filter
would go like
( &(objectClass=user)(objectCategory=person)(display Name=*test*) )

Cheers,
Florian
 
Reply With Quote
 
Guest
Posts: n/a

 
      06-02-2010
Thank you for your help,

I'm happy with your suggestion but I was really interested how can I
accomplish this via the AD Query Interface.

Thanks. Lion

"Florian Frommherz [MVP]" <> wrote in
message news:...
> Howdie!
>
> Am 02.06.2010 17:32, schrieb :
>> Can anyone help with how can I query AD for Account containing specific
>> word in the DisplayName. I am using Custom SSearch in AD and I have to
>> write the LDAP query which needs to display all accounts where
>> DisplayName contains test.
>>
>> Display all Accounts where DisplayName contains (Test)
>>
>> Sorry I'm new to LDAP and I need this to be in AD.

>
> You'd best try that with ldp.exe and the search facility there. As a
> search base, you'll choose your domain (ldap path) for example
> "DC=domain,DC=com", the scope would be "Subtree" and your search filter
> would go like
> ( &(objectClass=user)(objectCategory=person)(display Name=*test*) )
>
> Cheers,
> Florian


 
Reply With Quote
 
Florian Frommherz [MVP]
Guest
Posts: n/a

 
      06-02-2010
Howdie!

Am 02.06.2010 19:42, schrieb :
> Thank you for your help,
>
> I'm happy with your suggestion but I was really interested how can I
> accomplish this via the AD Query Interface.


Ah sure, I see. You can use the very same query that I posted
previously. You go for New>Query-> Button [Define Query...], in "Find",
choose "Custom Query" and then "Advanced". Long way to go, hah? In the
Query pane, you can actually paste the code.

Cheers,
Florian
 
Reply With Quote
 
Guest
Posts: n/a

 
      06-02-2010
Yu are going to kill me ha!

That's exactly what I did earlier and I got the error message;

Active Directory:

The query filter (
&(objectClass=user)(objectCategory=person)(display Name=*Mark*) ) its not a
valid query string.

Sorry :-(

"Florian Frommherz [MVP]" <> wrote in
message news:eNAVC#...
> Howdie!
>
> Am 02.06.2010 19:42, schrieb :
>> Thank you for your help,
>>
>> I'm happy with your suggestion but I was really interested how can I
>> accomplish this via the AD Query Interface.

>
> Ah sure, I see. You can use the very same query that I posted previously.
> You go for New>Query-> Button [Define Query...], in "Find", choose "Custom
> Query" and then "Advanced". Long way to go, hah? In the Query pane, you
> can actually paste the code.
>
> Cheers,
> Florian


 
Reply With Quote
 
kj [SBS MVP]
Guest
Posts: n/a

 
      06-02-2010

wrote:
> Yu are going to kill me ha!
>
> That's exactly what I did earlier and I got the error message;
>
> Active Directory:
>
> The query filter (
> &(objectClass=user)(objectCategory=person)(display Name=*Mark*) ) its
> not a valid query string.


(&(objectClass=user)(objectCategory=person)(displa yName=Mark*) )

works for me.

>
> Sorry :-(
>
> "Florian Frommherz [MVP]" <>
> wrote in message news:eNAVC#...
>> Howdie!
>>
>> Am 02.06.2010 19:42, schrieb :
>>> Thank you for your help,
>>>
>>> I'm happy with your suggestion but I was really interested how can I
>>> accomplish this via the AD Query Interface.

>>
>> Ah sure, I see. You can use the very same query that I posted
>> previously. You go for New>Query-> Button [Define Query...], in
>> "Find", choose "Custom Query" and then "Advanced". Long way to go,
>> hah? In the Query pane, you can actually paste the code.
>>
>> Cheers,
>> Florian


--
/kj


 
Reply With Quote
 
Florian Frommherz [MVP]
Guest
Posts: n/a

 
      06-03-2010
Howdie!

Am 02.06.2010 20:40, schrieb :
> Yu are going to kill me ha!
>
> That's exactly what I did earlier and I got the error message;
>
> Active Directory:
>
> The query filter (
> &(objectClass=user)(objectCategory=person)(display Name=*Mark*) ) its not
> a valid query string.


Funny, that filter (just c&p'ed it) works for me, too. What about just
(displayName=*Mark*) ?

Cheers,
Florian
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building custom reports - Need help with sql query Björn Axéll Update Services 15 03-31-2010 02:54 PM
LDAP Issue - LDAP BIND against Windows 2008 DC does not work QuesionVB Active Directory 1 03-24-2010 03:42 PM
+++++++ Exclude OUs using LDAP Query ++++++++ WildPacket Active Directory 1 03-05-2010 06:43 PM
LDAP query statistics from the server? hume.spamfilter@bofh.ca Active Directory 3 02-23-2010 03:14 PM
Re: DC with "Windows cannot obtain the domain controller name for your computer network" Danny Sanders Active Directory 0 01-21-2010 02:26 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59