Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 814
  • Last Modified:

dsget search by samid

I have a username/samid and need to find the email address of this user.

I know only the account name/samid of the user and want to find the email of this user.
Can I do that with dsget or dsquery? I know how to search for a full name of a person but I cant seem to find any info on how to search by samid, is it possible?

I tried "dsget user -samid username", but that didnt work..
0
bergsprekken
Asked:
bergsprekken
  • 2
2 Solutions
 
rmcgregorCommented:
Not exactly.

You should use dsquery to search this user and dsget - to get details.

like:
dsquery user -samid username* | dsget user -email
0
 
anuroopkoka2005Commented:
Try to download the free script from the below link which will display the user details:

http://the-roberts-family.net/vbscript/fu.htm
0
 
anuroopkoka2005Commented:
this simple script will give u all the details about the user account...
0
 
bergsprekkenAuthor Commented:
Thanks for the command description and exmple rmcgregor it was exactly what i needed. And thanks for posting the script anuroopkoka2005.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now