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

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?
Who is Participating?
Gary DewrellConnect With a Mentor Senior Network AdministratorCommented:
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 {$ -eq ""}
LorrecAuthor Commented:
Thank you for the quick response. This is what I needed.
LorrecAuthor Commented:
Thank you for the quick response and information.
Gary DewrellSenior Network AdministratorCommented:
You are very welcome.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.