Query

G

Guest

Is there a way to run a query on active directory and expoert it to a comma
delimited file or to excel. I want to run a query that produces a user's
first name, lastname, and email address.
 
R

Richard Mueller

George said:
Is there a way to run a query on active directory and expoert it to a
comma
delimited file or to excel. I want to run a query that produces a user's
first name, lastname, and email address.

Hi,

You can use the command line utility csvde to create a comma delimited file
with these attribute values for all users (and contacts). For example:

csvde -f report.csv -r (objectCategory=person) -l givenName,sn,mail

Check the command line help at a domain controller.
 
V

Vincent Xu [MSFT]

Hi ,

CSVDE is a good tool for this issue. We still have another tool called
LDIFDE . Please check following article:

Using LDIFDE to Import and Export Directory Objects to Active Directory
http://support.microsoft.com/kb/237677

Hope this helps.

Best regards,

Vincent Xu
Microsoft Online Partner Support

======================================================
Get Secure! - www.microsoft.com/security
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others
may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties,and confers no rights.
======================================================



--------------------
 
J

Jerold Schulman

Is there a way to run a query on active directory and expoert it to a comma
delimited file or to excel. I want to run a query that produces a user's
first name, lastname, and email address.

I like ADFIND.EXE freeware. See tip 5898 » Freeware ADFind in the 'Tips & Tricks' at http://www.jsifaq.com

adfind -csv -nodn -default -f "&(objectcategory=person)(objectclass=user)" givenName sn mail

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
http://www.jsifaq.com
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top