Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Active Directory Query

Posted on 2009-04-02
2
Medium Priority
?
208 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 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Active Directory can easily get cluttered with unused service, user and computer accounts. In this article, I will show you the way I like to implement ADCleanup..
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

719 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