Solved

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

Posted on 2008-09-29
3
222 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Resolve DNS query failed errors for Exchange
Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

778 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