Monday, July 1, 2013

Creating Additional SMTP Addresses For Exchange Users

I recently had to add an additional SMTP Address for all the users in my domain. I wrote this quick script that made it a no brainer:

    This script adds a new smtp address of
    to all email users that have an email address
    1.0 - 12/21/2011 Initial release
    None. You cannot pipe objects to this script.

$mailboxes = Get-Mailbox -resultsize unlimited -RecipientTypeDetails UserMailbox"
foreach ($mailbox in $mailboxes)
$newaddress = $mailbox.windowsemailaddress -replace '' , ''

$mailbox.EmailAddresses += $newaddress

Set-Mailbox -Identity $mailbox.alias -EmailAddresses $mailbox.EmailAddresses