How to change SMTP address, add old primary email address as alias. Do not remove all other alias

DoBongSoon 526 Reputation points
2024-02-21T02:54:51.3533333+00:00

Hi,

We have a new domain, and we want to achieve the following:

  • Add the new domain as the primary SMTP email address
  • We need to retain the old email address as an alias.
  • We don't want to delete existing aliases and proxy addresses.
  • The login also does not change. We want users to continue to log in using their old email address.
  • We have an on-prem Exchange 2019 server, Hybrid. All mailboxes are in the cloud, but the domain controllers are still on-prem as the authority.
  • We already registered the new domain, and I can achieve all this manually. I need to do this in bulk using CSV to ensure that only users who are in the CSV file will be modified to be cautious.

For this exercise, let's take John Smith as an example.

Username and login: JSmith

Current Email: JSmith@oldemail.com

New Email: JSmith@newemail.com

Proxy Addresses: there are multiple entries in Adsi edit for this user. SIP, FAXMaker, etc., that we want to keep as is.

How do I achieve this through Powershell or a free tool? I understand that there are many posts online, but I want to start new and ensure that this is custom to my request so I can follow. Thank you.

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,408 questions
Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,586 questions
Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
2,061 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,504 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Vasil Michev 103.5K Reputation points MVP
    2024-02-21T08:13:27.6933333+00:00

    In Hybrid scenarios, you can easily address this by configuring an new email address policy: https://learn.microsoft.com/en-us/Exchange/email-addresses-and-address-books/email-address-policies/email-address-policies?view=exchserver-2019

    If for some reason you are not able to leverage Email address policies, the "second best" solution is to use PowerShell. In particular, the -WindowsEmailAddress parameter of Set-Mailbox does exactly what you are looking for - it adds the new value as primary SMTP address, while preserving the old one as secondary. It does not change the UPN or anything else. Here's an example:

    Set-Mailbox user@domain.com -WindowsEmailAddress user@newdomain.com
    
    1 person found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. DoBongSoon 526 Reputation points
    2024-02-29T18:26:05.5166667+00:00

    Thanks for your help. I haven't implemented it yet but thank you for your response. I will follow your suggestion.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.