Solved

Active Directory Query

Posted on 2009-04-02
2
202 Views
Last Modified: 2012-09-21
Hi All
What would be the best query to use in retrieving the name, dept, Email address, and Phone number of all active users excluding groups from my active directory?
0
Comment
Question by:iolike
2 Comments
 
LVL 13

Expert Comment

by:martin_babarik
ID: 24053724
Hello, what about this one?
dsquery user dc=yourdomain,dc=com | dsget user -samid -dept -email -phone

I don't know what do you mean by "excluding groups". The commands mentioned will not list groups at all, just users.

Martin
0
 
LVL 57

Accepted Solution

by:
Mike Kline earned 500 total points
ID: 24053837
I really like adfind by MVP Joe Richards for this
http://www.joeware.net/freetools/tools/adfind/index.htm
adfind -default -f "&(objectcategory=person)(objectclass=user)" -nodn name samaccountname department mail telephonenumber -csv > c:\Myusers.csv
Wasn't sure if you wanted the name or samaccountname.  That will create a csv file on your C drive, open that in Excel and that should be what you need.
Thanks
Mike
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article demonstrates probably the easiest way to configure domain-wide tier isolation within Active Directory. If you do not know tier isolation read https://technet.microsoft.com/en-us/windows-server-docs/security/securing-privileged-access/s…
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
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 …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

713 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