• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

I need a script to display first names, last names and logon names of active directory users.

I need to produce a report in excel that will give a sortable list of first names, last names and logon names of active directory users.
0
automaton64
Asked:
automaton64
1 Solution
 
MikeKaneCommented:
From a DC, run this command:
dsquery user domainroot -limit 0 | dsget user -dn -fn -ln   >c:\list.txt

That will create the output in a textfile that can be brought into XLS.
0
 
PakaCommented:
Mike almost had it:
dsquery user -limit 0 | dsget user -samid -fn -ln > c:\list.txt
0
 
automaton64Author Commented:
Thank you.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now