Add Proxy Addresses to Many Users' Accounts with Windows PowerShell

 

Applies to: Office 365 for professionals and small businesses, Office 365 for enterprises, Live@edu

Topic Last Modified: 2013-04-02

You can use Windows PowerShell to add additional e-mail addresses, also known as proxy addresses, to existing user accounts. Such alternative e-mail addresses let users receive e-mail that is sent to different e-mail addresses. For example, e-mail sent to walter@contoso.edu and walter@alumni-contoso.edu is delivered to the same mailbox. You can add additional e-mail addresses to mailboxes by using the Exchange Control Panel, but if you want to add additional e-mail addresses to many existing mailboxes, using Windows PowerShell can be more efficient. To learn how to add and remove additional e-mail addresses one at a time, see Add or Remove Proxy Addresses to a User's Account.

Something to consider

When you add additional e-mail addresses to existing user accounts, you're adding proxy addresses from a different domain to the user accounts. For example, if your have their primary e-mail addresses in the @contoso.com domain, you can use this procedure to give every user account an additional proxy address in the @contoso.org domain. You're not adding a proxy address with a different alias to an existing user account. So, if a mailbox has the primary e-mail address user1@contoso.com, you can't add postmaster@contoso.com or postmaster@contoso.edu as a proxy address with this procedure. For more information, see Proxy Addresses.

Before you begin

To learn how to install and configure Windows PowerShell and connect to the service, see Use Windows PowerShell in Exchange Online.

Before you can add a proxy address to an existing user account, you must configure the address space as an accepted domain. For more information, see Accepted Domains.

Add proxy addresses to existing user accounts

Run the following commands:

$users = Get-Mailbox
foreach ($a in $users) {$a.emailaddresses.Add("smtp:$($a.alias)@<new domain name>")}
$users | %{Set-Mailbox $_.Identity -EmailAddresses $_.EmailAddresses}

For example, if your existing cloud-based domain is contoso.com, and you want to add an additional address to every user account for the accepted domain corp.contoso.com, run the following commands:

$users = Get-Mailbox
foreach ($a in $users) {$a.emailaddresses.Add("smtp:$($a.alias)@corp.contoso.com")}
$users | %{Set-Mailbox $_.Identity -EmailAddresses $_.EmailAddresses}
 
Related help topics
Loading...
No resources were found.