Thursday, August 14, 2014

Powershell - Adding new email address alias to Exchange 2010 mailboxes

$users = get-mailbox
foreach ($a in $user) {$a.emailaddresses.Add("smtp:$($a.alias)@new_domain.com")}
$users | %{Set-Mailbox $_.Identity -EmailAddresses $_.Emailaddresses}


I ran this with a -WhatIf inside the last } and it worked on my setup perfectly. Exchange 2010 SP3.

No comments:

Post a Comment