Tuesday, May 8, 2012

Powershell: Get a list with Username and Mail address from AD

Get a list with Username and Mail address. The output of the query will be saved in "c:\mail.txt".

Download-Link:
http://gallery.technet.microsoft.com/Get-a-list-with-Username-9a908c37/file/57193/1/GetUserMail.txt

(Import-Module ActiveDirectory required)

Sample Output:

SamAccountName          Mail
--------------                       ----
User1                            User1@corp.de
User2                            User2@corp.nl
User3                            User3@corp.fr

No comments:

Post a Comment