How about below?
dsquery * -filter "(&(objectCategory=Person)(objectClass=User))" -attr 
samaccountname mail -limit 5000 > filename.csv


From: Roger Wright [mailto:[email protected]]
Sent: Thursday, March 12, 2009 10:39 AM
To: NT System Admin Issues
Subject: Extract Email Addresses from AD

I need to extract user names and email addresses from AD for about 250 account 
across multiple OUs.

Is there a canned script or a free utility to do this?



Roger Wright
Network Administrator
Evatone, Inc.
727.572.7076  x388

[cid:[email protected]]
_____



"Politics is the art of looking for trouble, finding it, misdiagnosing it, and 
then misapplying the wrong remedies." - Groucho Marx






**********************************************************************
CONFIDENTIALITY NOTICE:  The information transmitted in this message is 
intended only for the person or entity to which it is addressed and may contain 
confidential and/or privileged material.  Any review, retransmission, 
dissemination or other use of this information by persons or entities other 
than the intended recipient is prohibited.  If you received this in error, 
please contact the sender and destroy all copies of this document.  Thank you.  
Butler Animal Health Supply
**********************************************************************


~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

<<inline: image001.jpg>>

Reply via email to