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 }