Re: LDAP query information



Hi Richard,
Thanks for your response. Using ADUC, you can create queries by selecting
the various attributes of the object but since the attributes of the object
listed are restricted to a few, we have the option to do a "Custom Search" &
then input the LDAP query. I have very less knowledge on working on LDAP
queries.
I had tried this query string - (&(objectCategory=computer)(name=*))
When I ran it, it executed successfully & gave me Name,Type,
Description,Modified fields. But when I tried the below query, it threw me a
query error
(objectCategory=computer)(name=*)(canonicalName=*)
It seems to be a wrong query input (canonicalName) or wrong value passed to
the attribute-CanonicalName(*). I have never worked on LDAP queries, so
please forgive my ignorance. I just assumed that the '*' argument pulled all
the info from AD regarding that object attribute.
Can you please construct a LDAP query so that I can run it & test it.
Appreciate your help in this!
Sorry for the trouble!
Thanks,
Tilak

"Richard Mueller" wrote:

Vishn wrote:

Can you please help me in creating a LDAP Query which will pull the
information about all the attributes of computer accounts in Active
Directory
domain - For example, General tab info like 'computer name', 'Role' ,
Object
tab information like 'Canonical name of the object' & 'Object class -
Created
& Modified' etc. I was able to pull most of the information except for
'Canonical name of the object' which could not be created using 'Saved
Queries' column in Active Directory. I can create one using 'custom
search'
which needs me to input an LDAP query for the above objects which I am not
aware of.
It would be really helpful is someone can post the LDAP query.


Hi,

I'm don't know how you can retrieve these values in ADUC, but the LDAP query
for computer objects would be:

(objectCategory=computer)

The attributes you refer to are:

sAMAccountName (NetBIOS name of the computer)
objectClass (multi-valued)
whenCreated
whenChanged
canonicalName (Constructed, also called operational, meaning not saved in AD
but computed when requested)
machineRole

I hope this helps.

--
Richard
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net



.



Relevant Pages

  • Exchange 2000 Address Lists
    ... I hope this is the correct newsgroup, I'm having some issues with configuring ... an Address List in Exchange. ... What I need is for the ldap query to find users ... The standard GUI for setting up queries will not allow this, ...
    (microsoft.public.exchange2000.admin)
  • Re: LDAP query information
    ... The problem is that canonicalName is operational. ... you can create queries by ... then input the LDAP query. ... Can you please construct a LDAP query so that I can run it & test it. ...
    (microsoft.public.windows.server.scripting)
  • Re: LDAP query information
    ... maybe a VBScript if not a LDAP query? ... you can create queries by ... It seems to be a wrong query input (canonicalName) or wrong value passed ...
    (microsoft.public.windows.server.scripting)
  • Re: Active Directory
    ... "Ed Wyche" wrote in message ... I am using an LDAP query. ... I read both description and info all the time with LDAP queries... ...
    (microsoft.public.vb.general.discussion)
  • Re: LDAP query information
    ... information about all the attributes of computer accounts in Active ... I was able to pull most of the information except for ... It would be really helpful is someone can post the LDAP query. ... canonicalName (Constructed, also called operational, meaning not saved in AD ...
    (microsoft.public.windows.server.scripting)