Solved

Active Directory Query

Posted on 2009-04-02
2
198 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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

As network administrators; we know how hard it is to track user’s login/logout using security event log (BTW it is harder now in windows 2008 because user name is always “N/A” in the grid), and most of us either get 3rd party tools, or just make our…
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

762 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

14 Experts available now in Live!

Get 1:1 Help Now