Objectcategory is indexed (objectclass is not), so objectcategory=person is more 
efficient.  Contacts have an objectcategory of person as well, though, so if you use 
only objectcategory=person you get both users and contacts.  By using both in an AND, 
you get only users.

The part about where to root the search obviously depends on where people put stuff in 
their directory, which is why I advised them to change it to whatever suits them...the 
"cn=users" part was just an example.

There's a discussion of the objectcategory and objectclass thing at 
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ad/ad/deciding_what_to_find.asp
 in case you're interested.  I always used just objectclass=user until someone pointed 
this out...

Dave

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Mulnick, Al
Sent: Wednesday, May 26, 2004 10:52 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Can LDP be used to create email report of all
use rs in AD?


The -l params is a nice touch but curious why you want to find objectClass
objects.  That's an inefficient query IIRC.  Plus, if you return each person
in the directory (you should start at a higher node to supply an answer to
his request which is to find ALL users in the domain;  if he had them in one
OU or container, he could use that script that as posted quite easily
wihtout much mod.)you're potentially bringing back way more than he wanted,
which again is inefficient right?  
It's a best practice to narrow the search as much as possible prior to
execution to prevent overloading the dc with query traffic.  ObjectClass is
not usually recommended nor is both user and person (they're redundant
mostly)in the same query.   Correct me if I'm wrong though.  I hate to be
wrong thinking I'm right ;)

Narrow it down to just users in the domain that have mail attributes and
return the mail and proxyaddresses attributes (forgot about the list of
attributes to post before in my haste to rush off to other things).

Al 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Fugleberg, David A
Sent: Wednesday, May 26, 2004 11:29 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Can LDP be used to create email report of all users
in AD?

csvde -f outfile.txt -d "cn=users,dc=yourdomain,dc=com" -r
"(&(objectclass=user)(objectcategory=person))" -l mail,proxyaddresses

Replace the "cn=users,dc=yourdomain,dc=com" with the place you want to start
the search, or leave out the -r altogether if you want to do the whole
domain naming context of the current domain.  You indicated they have only
one address, so you could leave off the proxyaddresses part as well.

HTH
Dave

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Grantham, Caron
Sent: Wednesday, May 26, 2004 9:55 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Can LDP be used to create email report of all users
in AD?


They only have one address, I'm trying to figure out the correct syntax for
a CSVDE export, do you know?
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Passo, Larry
Sent: Wednesday, May 26, 2004 9:45 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Can LDP be used to create email report of all users
in AD?

If your users have more than one email address, you will also need to get
the proxyAddresses attribute.

-----Original Message-----
From: Grantham, Caron [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 7:35 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Can LDP be used to create email report of all users in
AD?


I'm looking for a way to get an email address report for all user
objects in Active Directory. Any idea on how to do this? I see the mail
attribute in LDP but how can I get just this one field filtered out into
a report 

Thanks
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/

List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to