Pages

iDrive

IDrive Remote Backup

Friday, 23 March 2018

Swap the primay SMTP address from old domain to new one in Office365 with ADD Connect

Hello everyone,
I worked with this method several times and it is very useful and efficient when your customer in Office365 and you have AAD Connect in place and they want to change their primary domain with a new one say, the old one is cats.com to dogs.com and you need to deal with a lot of number of mailboxes, the steps are:
  1. In the Office365 and from the Active Users screen export the users to .csv
  2. Clean the sheet and leave the UPN and the Primary SMTP Address columns.
  3. Clean the UPN column by removing everything after the @. 
  4. Add the new email addresses in another column to the sheet.
  5. Change the heading in the sheet for the UPN to username for old smtp to OldEmail and for the new smtp NewEmail.
  6. Save the file as users.csv and copy it to the DC.
  7. Stop the AAD Connect from services till you finish all the process.
  8. Remove the old primary SMTP email address run the following:
    import-csv C:\temp\users.csv | foreach ({Set-ADUser -identity $_.Username -Remove @{proxyAddresses = "SMTP:"+($_.OldEmail)}})
  9. To add the new primary SMTP
    import-csv C:\temp\users.csv | foreach ({Set-ADUser -identity $_.Username -Add @{proxyAddresses = "SMTP:"+($_.NewEmail)}})
  10. To add the old primary as a secondary SMTP
    import-csv C:\temp\usesr.csv | foreach ({Set-ADUser -identity $_.Username -Add @{proxyAddresses = "smtp:"+($_.OldEmail)}})
  11. To check the changes:
    import-csv C:\temp\users.csv | foreach ({Get-ADUser -identity $_.Username -Properties *})| fl DisplayName,proxyaddresses
  12. After everything changed as you wish, start the AAD Connect services and watch the magic!

5 comments:

  1. Get Tips for FREE UNLIMITED OST TO PST CONVERTER - https://free-unlimited-ost-to-pst-converter.blogspot.com/

    ReplyDelete
  2. Zimbra to pst converter software is the exceptional software program to convert all zimbra document records in to pst file. Stella zimbra to pst converter software support all version 32bit and 64bit zimbra document facts in to pst record. Stella zimbra to pst converter software program convert all corrupted and unmounted zimbra report statistics into pst report.
    For greater information go to this hyperlink.
    zimbra to pst converter software

    ReplyDelete
  3. 7 zip Password Cracker Stella statistics recovery software program dispose of your 7 zip Password this software Crack 7 zip record Password any types with out troubles take away your 7 zip file Password via three alternatives dictionary attack , brute force attack , mask assault this software program software Crack your 7 zip report Password with out statistics injure of your 7 zip record. You could get higher your 7 zip document Password by means of free Demo model of seven zip document Password recovery.

    7 zip password remover

    ReplyDelete
  4. It is very clear Shopify, Magento, and different competitors of WooCommerce development indeed have free variations. But its advanced alternatives require the hiring of premium payment plans. However, extensions of WooCommerce require a payment or maybe monthly prices. On the other hand, WooCommerce is an especially beneficial option for prior experience with WordPress.

    ReplyDelete