I need to create a simple, 3 column csv:

Last Name, First Name, e-mail address

Note:  We are not running Exchange in-house anymore, so I can't get this 
through Exchange shell, which would be much, much simpler.  I have to get the 
info directly from Active Directory.

I've run the following command:

Get-ADUser -Filter * -Searchbase "top OU that I want to search from" 
-Searchscope Subtree | select Surname,GivenName,Mail | export-csv c:\location 
-NoTypeInformation

That only gives me the first and last name, not the Mail attribute.  So, I 
removed the select section, and just had it output everything to the csv.  
There's no mail attribute, and there's only 10 attributes showing.  How can I 
get to the mail attribute?

Thanks,

Joe Heaton
Enterprise Server Support
CA Department of Fish and Wildlife
1807 13th Street, Suite 201
Sacramento, CA  95811
Desk:  (916) 323-1284



================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

Reply via email to