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
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=*))"