29 C
Dubai
Thursday, November 21, 2024

Target Mailbox doesn’t have a proxy matching – Bulk add Proxy Address

Moving to Office 365 – Mailbox Migration Error

Error: MigrationPermanentException  “Target mailbox doesn’t have an SMTP proxy matching ‘<domain>.mail.onmicrosoft.com'” error when you try to move mailboxes to Exchange Online

Lets see how to add proxy addresses in bulk using powershell.

image

Issue happens only to users where email address policy is not enabled

image

Checking this Automatically Update Email Address on bulk for multiple mailboxes can give serious implications if the number of mailboxes are more .As in some environments people rename email address out of the email address policy for various reasons (Update/Customize,More friendly).

When you check Automatically Update Email Address . It will apply as specified in the policy like firstname.lastname@localhost or Alias@localhost which you can see in the email address policy settings.

Now lets see how to add the proxy address in bulk , Without updating the email address policy.

List Mailboxes where EmailAddressPolicyEnabled  is  False

Get-Mailbox -ResultSize Unlimited | Where-Object {$_.EmailAddressPolicyEnabled -like &quot;False&quot;}

image

Export to CSV –

Get-Mailbox -ResultSize Unlimited | Where-Object {$_.EmailAddressPolicyEnabled -like &quot;False&quot;} | Select-object Alias,PrimarySmtpAddress | Export-Csv UsersneedProxyaddress.csv

image

CSV looks like below –

image

Now Create a CSV like below Having the Custom Proxy address needs to be added to user mailboxes.

image

For Dummies – Using Excel Features.

image

image

To Add these Additional Proxy Addresses to these mailboxes –

Import-Csv AddProxyaddress.csv | ForEach-Object{Set-Mailbox $_.PrimarySmtpAddress -EmailAddresses @{add=$_.AddAddress}}

image

Verifying –

Import-Csv AddProxyaddress.csv | ForEach-Object{Get-Mailbox $_.PrimarySmtpAddress} | FT Emailaddresses

image

To Revert Back –

Import-Csv AddProxyaddress.csv | ForEach-Object{Set-Mailbox $_.PrimarySmtpAddress -EmailAddresses @{remove=$_.AddAddress}}

image

Satheshwaran Manoharan
Satheshwaran Manoharanhttps://www.azure365pro.com
Award-winning Technology Leader with a wealth of experience running large teams and diversified industry exposure in cloud computing. From shipping lines to rolling stocks.In-depth expertise in driving cloud adoption strategies and modernizing systems to cloud native. Specialized in Microsoft Cloud, DevOps, and Microsoft 365 Stack and conducted numerous successful projects worldwide. Also, Acting as a Technical Advisor for various start-ups.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

× How can I help you?