Zoho Banner September 2011

Archive for December, 2013

Today’s post is another short one.  It’s a Powershell one-liner to find all the Primary SMTP address suffixes in use by the mailboxes in your Exchange Org.

In this example I know that my default suffix is “contoso.com”, but I want to find out what others are being used as primary:

get-mailbox -ResultSize unlimited | ? {$_.primarySMTPaddress -notmatch "@contoso.com" } `
| select @{l="SMTPSuffix";expression={$_.primarysmtpaddress.tostring().Split("@")[1]}} –unique

The output (which will take a while as there is a lot of post-processing in the pipeline) looks like this:

SMTPSuffix
_______
fabrikam.com
northwindtraders.com
fouthcoffee.com

Enjoy!