Query with ADS and get these details

Posted on 2007-08-09
Last Modified: 2010-03-05

I want a script  to query the ads and get the
NT login
Email Id
Of all users in the Domain.

Question by:bsharath
    LVL 26

    Accepted Solution

    Click Start -> Run ->Cmd.exe

    DSQuery * domainroot -filter "(&(objectCategory=Person)(objectClass=User)(sAMAccountName=*))" -Attr Description name sAMAccountName mail -limit 0 >C:\FileName.txt
    LVL 11

    Author Comment

    Thanks a lot this worked....

    Farhan too busy @ work....

    Not anwering as before...

    LVL 26

    Expert Comment

    Thanks Sharath,Yea actually Im on job assignment to different city so don't get much free time.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
    This is a little timesaver I have been using for setting up Microsoft Small Business Server (SBS) in the simplest possible way. It may not be appropriate for every customer. However, when you get a situation where the person who owns the server is i…
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
    Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

    730 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

    18 Experts available now in Live!

    Get 1:1 Help Now