Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

3 Answers

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
add comment
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!

http://exchangepedia.com/2005/09/how-to-export-all-email-addresses-from-a-domain.html

share|improve this answer
add comment

Here it is mate:

Get-Mailbox -resultSize unlimited | foreach{
 $emails= $_ | select -expand EmailAddresses | where {$_.PrefixString -eq 'smtp'} | sort IsPrimaryAddress -desc | foreach {$_.smtpAddress}
 [string]::join(",",$emails)
} > C:\alias.txt
share|improve this answer
add comment

Your Answer

 
discard

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.