Results 1 to 2 of 2

Thread: How to get user email address from <domain name\ad-ent id> using dsquery and dsget?

  1. #1
    Join Date
    Apr 2012
    Posts
    1

    How to get user email address from <domain name\ad-ent id> using dsquery and dsget?

    Hello,

    Can someone please explain the command needed to obtain user's email address from <domain name>\<user ad-ent id> using DSQUERY and DSGET? I will need to invoke these dos commands from a perl script.

    Thanks,
    Teja

  2. #2
    Join Date
    Dec 2007
    Posts
    2,297

    Re: How to get user email address from <domain name\ad-ent id> using dsquery and dsget?

    Can you test the below code and see if it works for you, if it doesnt then you can also use a LDAP querie too:

    Code:
    cmd /c dsquery.exe * -limit 0 -filter "(&(objectCategory=person)(objectClass=user)(user id=1234)(mail=*))"

Similar Threads

  1. using Dsquery and DSGET
    By etechelp in forum Active Directory
    Replies: 1
    Last Post: 20-07-2011, 11:32 PM
  2. Replies: 2
    Last Post: 28-02-2010, 07:30 PM
  3. dsquery and dsget
    By aconti in forum Active Directory
    Replies: 1
    Last Post: 01-11-2009, 03:09 PM
  4. Replies: 2
    Last Post: 30-04-2009, 09:45 PM
  5. List of Last Logon Time with dsget/dsquery
    By Viensterrr in forum Active Directory
    Replies: 1
    Last Post: 17-09-2008, 05:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •