When adding new email addresses to a recipient using Exchange shell, remember that EmailAddresses property/proxyAddresses attribute is a multi-valued attribute. You can use the same syntax described in the previous post "HOW TO Update multi-valued attributes in PowerShell" to add one-off email addresses that are not created by EmailAddressPolicy.
$foo = get-mailbox User1
$foo.EmailAddresses +="sales@yourdomain.com","info@yourdomain.com"
$foo | set-mailbox
Labels: Administration, Exchange Server 2007, Exchange Shell, Mailbox

Exchangepedia Blog is read by visitors from all 50 US States and 150 countries world-wide


4 Comments:
Hi Bharat,
I wanted this to work with recipients.csv as mentioned in your excellent post "Bulk creation of mailboxes using Exchange Management Shell" (http://www.exchangepedia.com/blog/2006/11/exchange-server-2007-bulk-creation-of.html)
So with this code I can use the same csv file:
Import-CSV CreateRecipients.csv | foreach {
$Temp = Get-Mailbox -identity $_.UPN
$Temp.EmailAddresses.Add($_.Emailadres1)
$Temp.EmailAddresses.Add($_.Emailadres2)
$Temp.EmailAddresses.Add($_.Emailadres3)
Set-Mailbox -Instance $Temp}
How can you add custom address types such as X500 from powershell?
By appending the address type, e.g.:
$foo = get-mailbox jdoe
$foo.emailaddresses += "X400:C=USA;..... "
$foo | set-mailbox
When the second email address is created and then I try to send to that address it gets bounced back saying the recipient does not exist.
How can I create another email address for an existing user or users who already have email addresses?
Thanks
Post a Comment
Links to this post:
Create a Link
<< Home