Powershell script to change primary SMTP (reply address) for all users in a specific OU RRS feed

  • Question

  • Hello Technet Community,

    When users from my organisation send out emails internally/externally, the recipient will see their email address as:<o:p></o:p>


    When it should be:<o:p></o:p>


    Since we have a hybrid setup Office 365 is being synced with AD on-premise, which means that I can only change the objects primary SMTP via AD attribute editor.

    Is there a powershell script that I can use to swap the primary SMTP from "" to "" for all users in a specific AD OU (called "Users")?

    One thing to note is that we have two domain controllers.

    Many thanks to anyone who replies!

    • Edited by CrypticByte Wednesday, June 19, 2019 10:41 AM Spelling Mistakes
    Wednesday, June 19, 2019 10:40 AM

All replies