LDAP Query AD

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 

0
Lion
6/2/2010 3:32:30 PM
windows.server.active_director 902 articles. 0 followers. Follow

7 Replies
1306 Views

Similar Articles

[PageSpeed] 0

Howdie!

Am 02.06.2010 17:32, schrieb Lion@hotmail.com:
> 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)(displayName=*test*) )

Cheers,
Florian
0
Florian
6/2/2010 5:00:00 PM
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]" <florian@LEAVETHISOUT.frickelsoft.net> wrote in 
message news:eOUjBVnALHA.5808@TK2MSFTNGP02.phx.gbl...
> Howdie!
>
> Am 02.06.2010 17:32, schrieb Lion@hotmail.com:
>> 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)(displayName=*test*) )
>
> Cheers,
> Florian 

0
Lion
6/2/2010 5:42:46 PM
Howdie!

Am 02.06.2010 19:42, schrieb Lion@hotmail.com:
> 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
0
Florian
6/2/2010 6:13:14 PM
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)(displayName=*Mark*) ) its not a 
valid query string.

Sorry :-(

"Florian Frommherz [MVP]" <florian@LEAVETHISOUT.frickelsoft.net> wrote in 
message news:eNAVC#nALHA.1700@TK2MSFTNGP02.phx.gbl...
> Howdie!
>
> Am 02.06.2010 19:42, schrieb Lion@hotmail.com:
>> 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 

0
Lion
6/2/2010 6:40:20 PM
Another really cool tool is the PowerShell CMDLETs made by Quest
Software.  This cmdlet is really powerful and can do a lot.

You can do get-qaduser -LDAPFilter '(displayname=a*)'

http://www.quest.com/powershell/activeroles-server.aspx

I hope this helps...


-- 
melry88
------------------------------------------------------------------------
melry88's Profile: http://forums.techarena.in/members/227726.htm
View this thread: http://forums.techarena.in/active-directory/1343036.htm

http://forums.techarena.in

0
melry88
6/2/2010 7:06:56 PM
Lion@hotmail.com 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)(displayName=*Mark*) ) its
> not a valid query string.

(&(objectClass=user)(objectCategory=person)(displayName=Mark*) )

works for me.

>
> Sorry :-(
>
> "Florian Frommherz [MVP]" <florian@LEAVETHISOUT.frickelsoft.net>
> wrote in message news:eNAVC#nALHA.1700@TK2MSFTNGP02.phx.gbl...
>> Howdie!
>>
>> Am 02.06.2010 19:42, schrieb Lion@hotmail.com:
>>> 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 


0
kj
6/2/2010 10:14:52 PM
Howdie!

Am 02.06.2010 20:40, schrieb Lion@hotmail.com:
> 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)(displayName=*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
0
Florian
6/3/2010 5:53:23 AM
Reply:

Similar Artilces:

LDIFDE adding multiple email addresses
Can you use ldifde to add multiple email addresses to a single user? eg. test1@domain.com, test2@domain.com. Sure. The AD Attribute to use is ProxyAddresses. If you are just wanting to modify a single user, LDIFDE is rather a waste of time, though. It's a bulk import tool. You should also be able to use ADModify for something like this. -- Ben Winzenz Exchange MVP MessageOne Read my blog! http://winzenz.blogspot.com http://feeds.feedburner.com/winzenz (RSS Feed) "rob" <rsl315@gmail.com> wrote in message news:1137515696.607664.151920@g14g2000cwa.googlegroups.com...

Storing queries
I have multiple clients that have an MDB. The MDB has the same tables but some of the queries, reports and macros are different. I'd like to create one master database with all the objects. Do you have any suggestions on the best way to organize this mess? well, it's your life <g> Sub GetQueries() Dim TDb As DAO.Database, FDb As DAO.Database Dim TQd As DAO.QueryDef, FQd As DAO.QueryDef Set TDb = Access.CurrentDb Set FDb = Access.DBEngine.Workspaces(0).OpenDatabase("C:\Data\Db.mdb") For Each FQd In FDb.QueryDefs On Error Resume Next Set TQd = T...

Query about runtime error
hi i am working on IVR system, using TAPI 3 and VC++. This involves hardware modem. Operation system is XP. i am facing strange problem while i run my program sometimes(not always). My Program name is "Tapi Test" Error statement is ... "Tapi Test MFC application has encountered a problem and needs to close. We are sorry for inconvenious." With error there are three buttons with caption "Debug", "Send error report", "Don't Send" Could anybody please help me out. Tnaks in advance... Mujtaba Well, it means your program crashed in so...

Not show the data in the query
Hello, I transfer the excel data to database, since I want bulit it's data base. I found it that query will not show anything, if nothing filled in the other table, like gender table. My question is, is it the reason?. in the linked field ( foreign key) is empty, can we proceed entering anther records. For example we have member table( member id) lingked to called table, if there is no call for this member, I will proceed to the next member with the call data, can we proceed entering the data? Thanks in advance for any idea provided. -- H. Frank Situmorang Use an outer join Det...

Query based on two sets of depth intervals
I have two tables (this all has to do with drilling). The first table consists of a drill hole label, from depth, to depth, and geology (i.e. what rock is present at that interval). My second table has a drill hole label, sample number, from depth, to depth, and nickel content. I want to be able to query out what geology is present (from table 1) for each sample (table 2) interval. The geology intervals do not necessarily match the sample intervals. I'm unsure how to code this. Is there anyone out there who could give me some pointers? Anything I've tried so far has given...

LDAP #3
Migrating from Netscape to Outlook. Set up LDAP in Outlook. I am getting message: "Insufficientrights to browse this directory" I can access this directory from outlook express but not Outlook XP. What gives? ...

access caluclated field query
Hi, I am entering height, weights and age into a database and I want to create a query which enables Access to automatically caluclate BMI (two kinds depending upon the age of the kid) Any suggestions on how to do this? Thanks! E On Tue, 10 Jul 2007 09:01:40 -0700, airnuminz@yahoo.com wrote: >Hi, > >I am entering height, weights and age into a database and I want to >create a query which enables Access to automatically caluclate BMI >(two kinds depending upon the age of the kid) > >Any suggestions on how to do this? > >Thanks! >E BMI - and for that matter a...

Editing Data source from imported web query
Hi, I've currently got an Excel sheet with a table I've imported from a web page I've created. This was done using the Data->Import External Data->New Web Query. The page itself is a CGI script and as such takes arguments in the address. I was wondering if anyone knows how I can alter that URL from a cell in Excel. Specifically I want to be able to change the hostname in a cell in Excel and the corresponding ?hostname='blah' to change. Any ideas would be greatly appreciated. Jim It seems to me that you'll need a macro to do what you're trying to accomp...

Library recently added
I use the library recently added view a lot because I go through a lot of albums and it annoys me that I cannot specify or even influence the content of this category. Firstly because I buy a lot of albums I would like to specify the number of albums that are in the recently added section. eg. 10 Secondly because I loose track of how long I have been listening to something I would like to specify the amount of time that it is included in the recently added music, so that I ensure that I give music a fair chance and get some decent value from it. This is to stop the recently ad...

LDAP Server
I have added an LDAP server as a service in Outlook. It normally works fine, but the problem is when searching for a name which is duplicated (common name), only the last person is returned in Outlook. I have captured packets and found that in one case 5 results are being returned, but only 1 is displayed in Outlook. I have tested this on both Outlook 2000 SP 3 and Outlook XP SP 2. Does anyone know why Outlook filters results and only displays the last result from the query? Thanks for your help Sure I will email you with the info Thanks, Mike On Wed, 23 Jul 2003 09:18:23 -0400,...

Query design question?
Query1 retrieves data for 2,000 records from a series of linked tables that have about 100,000 recordset Query2 retrieves data for 5,000 records from another series of linked tables that has about a 100,000 recordset as well. Query1 and Query2 are linked on a customer ID (e.g.) Should there be a simple join between Query1 and Query2 on Customer ID, or would there there be a benefit to limiting the records in Query2 first? Yes, SQL Server app - have an old stopwatch, but didn't know if some general guidelines applied. "Jerry Whittle" <JerryWhittle@discussions.micros...

Tooltip position incorrect for controls added to CToolbar.
I have a toolbar derived from CToolbar control. The tooltip displays BELOW the cursor as expected for buttons on this toolbar. However, this toolbar also has several CSliderbar controls (used for adjusting volumes, and show the progress). The tooltip for the CSliderbar controls always displays right below the control, centered, regardless where the mouse cursor is. As a result, the cursor will often block the tooltip. I've tried using TTN_SHOW to get notifications when the tooltip is about to appear, then call SetWindowPos. The only thing it was successful at was changing the dimension of...

Project Accounting related Query
Hi, We have situation, where the company is in the process of selling software to there clients. We need to book the product cost in Project accounting. With out using retention fees,project fees and other fees. can you help me out in booking the product cost in project accounting. with thanks ...

query LDAP
I'd like to make a worksheet with the following columns: Username Full name Email This data is somewhere inside our address book server, an LDAP server (not Windows). I have Googled this but have not yet found interesting results. -- Amedee Van Gasse using XanaNews 1.17.3.1 If it has an "X" in the name, it must be Linux? How To Ask Questions The Smart Way http://www.catb.org/~esr/faqs/smart-questions.html How to Report Bugs Effectively http://www.chiark.greenend.org.uk/~sgtatham/bugs.html Only ask questions with yes/no answers if you want "yes" or "no" a...

LDAP
Dear All, Having recently updated an ICQ program .. I now find this message popping up every time I open Outlook : " Can't contact LDAP Directory Server ( 81 ) " On clicking OK it disappears and Outlook runs as normal. I have looked up info about this LDAP Directory Server on Microsoft's Site and in my Outlook Help files .. but although I am fairly computer literate ... I must admit to not understanding it. Can anyone tell me what exactly it is, in layman's language please .. plus if it is necessary to be able to have this contact .. if so .. how to program my syste...

Adding/copying Worksheet to Excel
I got 10 worksheets in workbook Master (file master.xls) and I wand to copy them to the workbook B (file b.xls). How can I do this? I need to this for few thousand files. "Nicolas" wrote: > I got 10 worksheets in workbook Master (file master.xls) and I wand to copy > them to the workbook B (file b.xls). > How can I do this? I need to this for few thousand files. This is code sample that shows how to add new worksheet in vb.net Dim obook As Excel.Workbook Dim osheet As Excel.Worksheet obook = oexcel.Workbooks.Add osheet ...

query error
Hi, I am running a query based on 3 queries q1 has this PurchDoc Item Rel Vendor Vendor name Order Type PO Date Material Short Text MRPCn Del Date Deliv Date PO Quantity GR Quantity QtyRed RemQty PD release Reschdate CC Created on Exc Net Order Value ID 46353228 190 F 10000019 RA LALLI NB 11/6/2006 109-0718-13-101 PASSACINGHIA AK7 6/13/2013 44 42 0 0 1/2/2010 11,396.00 14632 q2 has this PurchDoc Item Rel Vendor Vendor name Order Type PO Date Material Short Text MRPCn Del Date Deliv Date PO Quanti...

Can't receive mail from Internet after renaming AD account
I need your help regarding my problem. Say I created a user and given her a firstnyme and lastname. Her email address would be firstnyme.lastname@domain.com based on our recipient update policy. The next day the account needs to be renamed because of a typo on the request. So i edited the account by renaming and edited her smtp address as well to firstname.lastname@domain.com. Everything seemed fine as her new name has already reflected in the GAL. However, several days later i received a complaint that she can't receive email from outside our exchange organization from her re...

Secure LDAP
I'm testing Outlook 2000 and 2003 and I'm having problems using secure ldap connections with an error that reads "Can't connect to ldap server (81). The configuration is the same as my working netscape configuration which works. A packet sniff comparison revealed that netscape successfully connected using SSLv3.0 while Outlook tries to initiate a connection using SSLv2.0 and fails. I can connect flawlessly to ldap as long as I turn Outlooks LDAP SSL feature off. Does anyone know of a fix or patch for this problem. Or maybe a way to force Outlook to use SSLv3.0? Ok. Furt...

How to display Contact Addresses in Last Name orderInside the Ad B
I am currently using Outlook 2000 on a MS Exchange server. I have added the Contact folder to the "Outlook Address Book" of the Exchange Address Book (it includes other company lists). When I select an e-mail address from the company address lists, the lists are displayed last name first name. When I select an address from the contact list they are displayed first name last name. I would like the contact list to be displayed as Last name, first name. Any suggestions? I have look at the propoerties of the outlook address book and I have the "File As" selected for the...

Adding Array Fields on forms
How to use Modifier to add an array fields of 3 elements on a form? thks in advance. Hi HFLO, Open modifier and select gp or 3rd party and then select exisiting modified form or select new form and then open window layout. From the Toolbox slect local fields in drop-down and press the new button and then enter field name and enter the array size for e.g. 3 and then select the datatype string or text and press OK button. Toolbox will show the newly created the array field, select that arrayfield and drag and dropped onto the layout 3 times. Hence ur array field would be there on ur for...

Value in Crosstab Query
Can I show all the data or merge them into one single cell, instead of doing any aggregate functions such as sum and average, in a Crosstab Query? To illustrate my question: StudentID TestID Score (Date) AAA 1 50 (date1) AAA 1 60 (date2) AAA 1 55 (date3) AAA 2 23 (date2) AAA 2 24 (date4) AAA 3 98 (date4) I want to show the data in a Query or Report in this way: Stude...

Constraint Violation when attempting to forward e-mails among AD
Constraint Violation when attempting to forward e-mails among AD Domains: We have 2 different domains/Forests with a Trust between and 2 different Exchange servers. Both running Windows 2003 with Active Directory. Domains trust each other and everything is accessible both by IP and netbios name; servers can be browsed by either site location. Here's where my problem is: I want to forward a copy of all e-mail from site B to an account in site A. When I go into his account properties in AD Users and Computers at Site B, and attempt to forward th...

Queries
I have created an Access database (2003) that contains information about the status of specific projects our office is working. There is only one table and the database contains the names of about 30 employees. Each employee is assigned specific work and required to input dates regarding the status of each part of the overall process (there are about 5 pieces). Is it possible to create a query where I input the employee's name and a single date criteria (i.e. between 6/13/07 and 6/20/07) and Access will search across multiple fields to return the requested information? For insta...

Latest date in a query!
What would I need to enter to show the one record of each client by latest date? Thanks for any Help..........Bob In a Totals query select Client - Group By and action date - Maximum. -- KARL DEWEY Build a little - Test a little "Bob V" wrote: > > > What would I need to enter to show the one record of each client by latest > date? > Thanks for any Help..........Bob > > > If you want to show the entire record for each client, but only the most recent one for each client then your query would look something like: SELECT tblClients.* FROM tbl...