Solved

Active Directory Query

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Last week, our Skyport webinar on “How to secure your Active Directory” (https://www.experts-exchange.com/videos/5810/Webinar-Is-Your-Active-Directory-as-Secure-as-You-Think.html?cid=Gene_Skyport) provided 218 attendees with a step-by-step guide for…
This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
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 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 …

734 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