Solved

Active Directory Query

Posted on 2009-04-02
2
200 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
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…

773 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