1

I've been tasked with appending an email address for existing users. I have 500 users in an Exchange 2010 environment that have Company.com as their email address. For email segmentation due to marketing being spammers, I have to port those people over to Marketing.com or Marketing2.com. I can figure out how to create new emails in bulk via CSV, but I'm not sure how to just append a new email domain on an existing username and set that new email address domain as the default Reply-To address.

I will be importing the users from a CSV with Column A header reading UserID and Column B header reading Domain to signify the username (exchange alias) of the user that will be changed and the email address domain that will be appended, respectively.

I'm fairly decent at PowerShell, so I'm not exactly looking anyone to do the work for me, just point me in the right direction.

I was thinking something along the lines of this, but can't figure it all out.

$Mailboxes = Import-CSV C:\Scripts\EmailDeliverability\UserImport.csv 
ForEach ($Mailbox in $Mailboxes) {Get-Mailbox $UserID $UserID.EmailAddress += "$UserID@$Domain" | set-mailbox } 

1 Answer 1

3

I was just about to type up some cool PowerShell snippet that could do this for you, but honestly that feels like doing you a huge disservice.

This is the exact kind of thing you should use E-mail Address Policies for.

You'll need to use PowerShell (the Exchange Management Shell) to create the new policy and, optionally specify a recipient filter (ie. if only the Marketing dept. is supposed to have this additional address):

New-EmailAddressPolicy -Name "Marketing2" -IncludedRecipients MailboxUsers -ConditionalDepartment "Marketing","Executive Spamming Dept." -EnabledEmailAddressTemplates "SMTP:%[email protected]","smtp:%[email protected]"
2
  • huh, hadn't thought about that. Thanks for the link and the PS line. Let me do some reading and see if I can make this work for me.
    – Dave H.
    Apr 21, 2015 at 17:58
  • @DaveH. using address policies will surely minimize the number of "snowflakes" you need to continuously maintain. Be sure to explore the related topics on TechNet, the recipient filter conditionals are a bit strange to wrap your head around, but very useful once you get it. Apr 21, 2015 at 18:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .