Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What ways can i query my Exchange 2007 server for all email aliases used?

share|improve this question

This should get you a list

Get-Mailbox | fl UserPrincipalName, Emailaddresses, PrimarySMTPaddress

This command will show you the user, smtp addresses and the primary address.

share|improve this answer
up vote 2 down vote accepted

Sorry i didn't answer sooner, I ended up working a bit on my Google-fu and came up with the following which gave me the entire list of email addresses, primary or aliases for my entire domain. Thanks!

share|improve this answer

Here it is mate:

Get-Mailbox -resultSize unlimited | foreach{
 $emails= $_ | select -expand EmailAddresses | where {$_.PrefixString -eq 'smtp'} | sort IsPrimaryAddress -desc | foreach {$_.smtpAddress}
} > C:\alias.txt
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.