export all users inf from AD

Alkannetworks
Alkannetworks used Ask the Experts™
on
Dear i need to export all users from active directory 2008 r2 , i jyst need to export name, email ,user name and employee ID
thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2013
Commented:
use powershell

get-aduser -filter * -properties * | select-object  name, mail, samaccountname, empoloyeeid | export-csv users.csv

you will need the AD cmdlets,  import-module activedirectory (in using posh 3.0 or later that will happen automatically if the cmdlets are there)

Thanks

Mike

Author

Commented:
OK i iwll try it , but where i can found the exported file

Author

Commented:
many thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial