Solved

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

Posted on 2008-09-29
3
221 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
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 200 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 Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now