Bulk change primary outgoing emails in hybrid environment

%3CLINGO-SUB%20id%3D%22lingo-sub-1569901%22%20slang%3D%22en-US%22%3EBulk%20change%20primary%20outgoing%20emails%20in%20hybrid%20environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1569901%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EWe%20are%20%3CSTRONG%3Ere-branding%3C%2FSTRONG%3E%26nbsp%3Bour%20company%20and%20therefore%20we%20need%20to%20%3CSTRONG%3Echange%20the%20email%20address%20displayed%20on%20outgoing%20emails%3C%2FSTRONG%3E.%20We%20also%20%3CSTRONG%3Edo%20not%20want%20to%20change%20their%20login%20email%20address%3C%2FSTRONG%3E%2C%20only%20their%20exchange%20address.%26nbsp%3B%20We%20also%20need%20to%20keep%20the%20current%20address%20as%20an%20alternative.%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CU%3EEnvironment%26nbsp%3Bsetup%3B%3C%2FU%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3EHybrid%20setup%20containing%26nbsp%3Bon-premises%26nbsp%3Bexchange%20server%20and%20o365%20Exchange%20online%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CU%3ECurrent%20tested%20status%3B%3C%2FU%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CSPAN%3EI%20tested%20it%20Exchange%20online%20in%20o365.%20Below%20shows%20the%20attempted%20steps%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CEM%3EI%20could%20do%20it%20for%20one%20user%20as%20below%3A%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23000000%22%3ESet-Mailbox%20username%20-WindowsEmailAddress%20%3CA%20href%3D%22mailto%3Ausername%40domain.com%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eusername%40domain.com%3C%2FA%3E%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EI%20could%20do%20it%20for%20bulk%20users%20as%20below%20(using%20a%20csv%20file)%3B%3C%2FEM%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3EImport-CSV%20%22F%3A%5Ctest.csv%22%20%7C%20foreach%20%7BSet-Mailbox%20%24_.Mailbox%20-WindowsEmailAddress%20%24_.NewEmail%7D%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22lia-spoiler-container%22%3E-ERR%3AREF-NOT-FOUND-Spoiler%3CNOSCRIPT%3E(Highlight%20to%20read)%3C%2FNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-border%22%3E%3CDIV%20class%3D%22lia-spoiler-content%22%3EIn%20this%20scenario%2C%20i%20have%20to%20export%20a%20CSV%20file%20from%20the%20AD%20server%20to%20get%20users'%20usernames%20and%20email%20addresses.%26nbsp%3B%3C%2FDIV%3E%3CNOSCRIPT%3E%3CDIV%20class%3D%22lia-spoiler-noscript-container%22%3E%3CDIV%20class%3D%22lia-spoiler-noscript-content%22%3EIn%20this%20scenario%2C%20i%20have%20to%20export%20a%20CSV%20file%20from%20the%20AD%20server%20to%20get%20users'%20usernames%20and%20email%20addresses.%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FNOSCRIPT%3E%3C%2FDIV%3E%3C%2FDIV%3E%3CP%3E%3CU%3EQuestions%3B%3C%2FU%3E%3C%2FP%3E%3COL%3E%3CLI%3EHow%20to%20do%20it%20in%20on-premises%20Exchange%20server%3F%3C%2FLI%3E%3CLI%3EIs%20there%20any%20method%20other%20than%20what%20i%20tried%20to%20do%20it%20in%20Exchange%20online%3F%3C%2FLI%3E%3C%2FOL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1569901%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Online%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExchange%20Server%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHybrid%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1569918%22%20slang%3D%22en-US%22%3ERe%3A%20Bulk%20change%20primary%20outgoing%20emails%20in%20hybrid%20environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1569918%22%20slang%3D%22en-US%22%3E%3CP%3EUse%20Email%20Address%20Policies%2C%20that's%20what%20they%20are%20designed%20for%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Femail-addresses-and-address-books%2Femail-address-policies%2Femail-address-policies%3Fview%3Dexchserver-2019%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fexchange%2Femail-addresses-and-address-books%2Femail-address-policies%2Femail-address-policies%3Fview%3Dexchserver-2019%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1570113%22%20slang%3D%22en-US%22%3ERe%3A%20Bulk%20change%20primary%20outgoing%20emails%20in%20hybrid%20environment%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1570113%22%20slang%3D%22en-US%22%3EThanks%20i%20will%20check%20that.%20What%20do%20you%20think%20about%20Exchange%20online%20attempt.%20is%20there%20any%20good%20one%20except%20that%3F%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

We are re-branding our company and therefore we need to change the email address displayed on outgoing emails. We also do not want to change their login email address, only their exchange address.  We also need to keep the current address as an alternative. 

 

Environment setup;

  • Hybrid setup containing on-premises exchange server and o365 Exchange online

Current tested status;

  • I tested it Exchange online in o365. Below shows the attempted steps

I could do it for one user as below:

Set-Mailbox username -WindowsEmailAddress username@domain.com

 

I could do it for bulk users as below (using a csv file);

Import-CSV "F:\test.csv" | foreach {Set-Mailbox $_.Mailbox -WindowsEmailAddress $_.NewEmail}

 

Spoiler
In this scenario, i have to export a CSV file from the AD server to get users' usernames and email addresses. 

Questions;

  1. How to do it in on-premises Exchange server?
  2. Is there any method other than what i tried to do it in Exchange online?

 

2 Replies
Highlighted
Highlighted
Thanks i will check that. What do you think about Exchange online attempt. is there any good one except that?