?
Solved

export/list all user's SAMIDs

Posted on 2010-01-08
4
Medium Priority
?
830 Views
Last Modified: 2012-05-08
How do I export all the user's samid in the USERS container into a text file?

Thanks.
0
Comment
Question by:nav2567
[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
4 Comments
 
LVL 12

Accepted Solution

by:
benhanson earned 1200 total points
ID: 26260432
You can do it from the command line using dsquery:

dsquery * -filter "(&(objectCategory=user))" "OU=Users,DC=domain,DC=com" -limit 0 -attr samAccountName >> UsersBySamAccountName.txt
0
 
LVL 3

Assisted Solution

by:tusharnextgen
tusharnextgen earned 400 total points
ID: 26272392
0
 
LVL 11

Assisted Solution

by:bsharath
bsharath earned 400 total points
ID: 26278176
I like using a great tool called adfind by Joe Richards

http://www.joeware.net/freetools/tools/adfind/index.htm</P>

adfind -default -bit -f  "&(objectcategory=person)(objectclass=user)(!userAccountControl:AND:=2)" samaccountname displayname -csv > c:\EnabledUsers.csv

That will give you a csv file on your C drive with all enabled users.

From Ee
0
 

Author Closing Comment

by:nav2567
ID: 31674919
Thanks everyone for helping
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
A couple of months ago we ran into an issue that necessitated re-creating our Edge Subscriptions. However, when we attempted to execute the command: New-EdgeSubscription -filename C:\NewEdgeSub_01.xml we received an error indicating that the LDAP se…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
Suggested Courses
Course of the Month14 days, 3 hours left to enroll

800 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