Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

AD Query - Getting Usernames , Emails , Etc with DSQUERY | DSGet

Posted on 2009-04-22
2
Medium Priority
?
902 Views
Last Modified: 2012-05-06
Hi !
Our forestroot has around 15k or more users...
im trying to create a simple dsquery in order to get a full list of all the users , including first name , last name , email , pager , employee id...

im trying

dsquery user forestroot -limit 0 | dsget user -fn -ln -email -empid -pager >> emp.txt

however - the file keeps empty , if ill do it on a certain user using the search scope i.e *mark* - i will get all users who contain Mark , however - i cant do it on "all users"
is there a limitation? is there a way i can do it on all my 15k users?

thanks!
0
Comment
Question by:m0tek
2 Comments
 
LVL 6

Expert Comment

by:mvgeertruyen
ID: 24203024
What if you set the limit to 1000? Does the file fill? (15k users might just take longer then expected?)
0
 
LVL 57

Accepted Solution

by:
Mike Kline earned 2000 total points
ID: 24204665
Have to test out the dsquery/dsget
Can you give adfind a try  - great tool by Joe Richards
http://www.joeware.net/freetools/tools/adfind/index.htm
adfind -default -f  "&(objectcategory=person)(objectclass=user)" samaccountname givenname sn mail pager  -nodn -csv > c:\Allusers.csv
that will produce a csv of all your users on the C drive
Thanks
mike
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
Scripts are great for performing batch jobs against users, however sometimes the GUI is all you need.
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…
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…

580 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