?
Solved

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

Posted on 2008-09-29
3
Medium Priority
?
227 Views
Last Modified: 2011-08-18
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
Comment
Question by:automaton64
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 33

Expert Comment

by:MikeKane
ID: 22598351
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
 
LVL 22

Accepted Solution

by:
Paka earned 800 total points
ID: 22598411
Mike almost had it:
dsquery user -limit 0 | dsget user -samid -fn -ln > c:\list.txt
0
 

Author Closing Comment

by:automaton64
ID: 31501252
Thank you.
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
Suggested Courses
Course of the Month12 days, 15 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question