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
Solved

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

Posted on 2013-01-03
4
1,010 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article runs through the process of deploying a single EXE application selectively to a group of user.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

828 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