Add secondary SMTP Address with Powershell
Posted on 2010-09-23
I have Exchange 2007 with 1000 mailboxes defined. Each mail box has a Primary SMTP address added by an Address Police. I have about 200 Mailboxes that I need to add a secondary SMTP address. I would like to do this with powershell. When I try to add them with the Set-Mailbox command I get the following error.
Set-Mailbox : The e-mail addresses for this recipient are automatically generat
ed based on e-mail address policies. To modify the primary SMTP address for thi
s recipient, you must disable automatic updating of e-mail addresses based on e
-mail address policy.
Ok So I disable the address policy with;
Set-Mailbox -EmailAddressPolicyEnabled $False
And rerun the Set-Mailbox -emailaddresses email@example.com and I get the following error;
Set-Mailbox : There is no primary SMTP address.
All I want to do is add another Secondary SMTP address with PowerShell, without disturbing the address that are already there. I can do this all day long with the Exchange Management Console!