Solved

Get the AD User account using e-mail address from a list using PowerShell

Posted on 2013-01-03
4
1,046 Views
Last Modified: 2013-01-03
I have a list of e-mail addresses. I would like to query Active Directory and get the user logon name attached to each e-mail address. I was trying to use Get-ADUser but keep running into problems. Could someone point me in the right direction?
0
Comment
Question by:Lorrec
[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
  • 2
4 Comments
 
LVL 12

Accepted Solution

by:
Gary Dewrell earned 500 total points
ID: 38741600
Couple of different ways to do this. If you have exchange 2007 or later you can just poll exchange for the info get-mailbox -identity $username

If you need to poll ad for it you will find that the built in AD commandlets or not so good however Quest has released a free set of commandlets to extend AD access from powershell.

Using the Quest commandlet it would be simply:

get-qaduser | where {$_.email -eq "user@domain.com"}

http://www.quest.com/powershell/activeroles-server.aspx
0
 

Author Comment

by:Lorrec
ID: 38741657
Thank you for the quick response. This is what I needed.
0
 

Author Closing Comment

by:Lorrec
ID: 38741659
Thank you for the quick response and information.
0
 
LVL 12

Expert Comment

by:Gary Dewrell
ID: 38741667
You are very welcome.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Suggested Solutions

This article shows the method of using the Resultant Set of Policy Tool to locate Group Policy that applies a particular setting.
Active Directory security has been a hot topic of late, and for good reason. With 90% of the world’s organization using this system to manage access to all parts of their IT infrastructure, knowing how to protect against threats and keep vulnerabil…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

751 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