Solved

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

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

Join & Write a Comment

Do you have users whose passwords are expiring and they are constantly calling you?  Well I sure did and needed a way to put an end to this.  We have a lot of remote users which would not be notified that their passwords were expiring since they wer…
Installing a printer using group policy preferences is not that hard let’s take a look at it. First lets open up your group policy console and edit the policy you want to add it to. I recommend creating a new policy for each printer makes it a l…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

760 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