{"id":5522,"date":"2024-02-15T09:01:56","date_gmt":"2024-02-15T07:01:56","guid":{"rendered":"https:\/\/www.msb365.blog\/?p=5522"},"modified":"2024-02-15T09:01:56","modified_gmt":"2024-02-15T07:01:56","slug":"exchange-online-mail-forwarding","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=5522","title":{"rendered":"Mail forwarding to external Mail address BULK"},"content":{"rendered":"<p>Especially during a messaging migration, situations may arise where external message forwarding has to be set up for several users.<\/p>\n<p>One of the reasons, given as an example, may be that the affected users have to be migrated to a new tenant and a new primary SMTP has to be used on this tenant.<br \/>\nTo be more precise: The company Fabrikam was bought by Contoso and the users have to be migrated on the one hand, and on the other hand all users of Fabrikam get the @contoso.com mail domain as primary SMTP address.<\/p>\n<p>I have already described how to migrate in my article:<\/p>\n<div class=\"vlp-link-container vlp-layout-compact\"><a href=\"https:\/\/www.msb365.blog\/?p=5513\" class=\"vlp-link\" title=\"TOOLS (AND MIGRATION PLAYBOOK) FOR MAIL MIGRATION\" rel=\"nofollow\" target=\"_blank\"><\/a><div class=\"vlp-layout-zone-side\"><div class=\"vlp-block-2 vlp-link-image\"><img decoding=\"async\" style=\"max-width: 100px;\" width=\"100\" height=\"100\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/07\/Logo_N1.png\" class=\"attachment-100x999 size-100x999\" alt=\"\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/07\/Logo_N1.png 800w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/07\/Logo_N1-300x300.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/07\/Logo_N1-150x150.png 150w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/07\/Logo_N1-768x768.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/07\/Logo_N1-500x500.png 500w\" sizes=\"(max-width: 100px) 100vw, 100px\" \/><\/div><\/div><div class=\"vlp-layout-zone-main\"><div class=\"vlp-block-0 vlp-link-title\">TOOLS (AND MIGRATION PLAYBOOK) FOR MAIL MIGRATION<\/div><div class=\"vlp-block-1 vlp-link-summary\">In this article, I describe one (of several) ways in which a mailbox migration can be carried out from, for example, an old on-premise infrastructure to a new Exchange online migration.<br \/>\nIn my practical example, the two sites are on different tiers, and have no connection to each other.<\/div><\/div><\/div>\n<p>However, if the Fabrikam users have to work with the new mailbox and the new primary SMTP from now on, they will connect to the new mailbox.<br \/>\nIn this scenario, the mail content migration can run independently of this.<\/p>\n<p>\u00a0<\/p>\n<p>In this article, I will show you a way of carrying out the mail content migration as a \u201csilent big bang\u201d.<\/p>\n<p>The longer the users work with the new mailbox, the less important the old mail address becomes (for the mail flow).<br \/>\nIt is therefore advisable to set up forwarding to the new mail address (new tenant) for the old mail address (old tenant).<br \/>\nFor individual users, this can be easily implemented via the Exchange online Admin Centre.<br \/>\nFor multiple users, the PowerShell is a useful tool.<br \/>\nThe prerequisite for this is that the corresponding Exchange online PowerShell module has been installed.<\/p>\n<p>One variant is to use the following script:<\/p>\n<pre><em># List of Users and their forwarding addresses<\/em>\r\n\r\n$users = @{\r\n  \u00a0 \"AlexW@fabrikam.com\" = \"AlexW@contoso.com\"\r\n  \u00a0 \"DebraB@fabrikam.com\" = \"DebraB@contoso.com\"\r\n}\r\n\r\n<em># Setup forwarding<\/em>\r\n\r\nforeach ($user in $users.GetEnumerator()) {\r\n  \u00a0 Set-Mailbox -Identity $user.Name -ForwardingSmtpAddress $user.Value -DeliverToMailboxAndForward $True\r\n  \u00a0 Write-Host \"Forwarding for $user.name is set!\" -ForegroundColor Green\r\n}<\/pre>\n<p>\u00a0<\/p>\n<p>This works for a large number of users.<br \/>\nHowever, if you prefer to work with a CSV file, the script in the following link might help you.<\/p>\n<div class=\"vlp-link-container vlp-layout-compact\"><a href=\"https:\/\/github.com\/MSB365\/MailMigration-EXO\/blob\/main\/ExternalSMTPforwarding.ps1\" class=\"vlp-link\" title=\"ExternalSMTPforwarding.ps1\" rel=\"nofollow\" target=\"_blank\"><\/a><div class=\"vlp-layout-zone-side\"><div class=\"vlp-block-2 vlp-link-image\"><img decoding=\"async\" style=\"max-width: 100px;\" width=\"100\" height=\"100\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/05\/GitHub-Mark.png\" class=\"attachment-100x999 size-100x999\" alt=\"\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/05\/GitHub-Mark.png 560w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/05\/GitHub-Mark-300x300.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/05\/GitHub-Mark-150x150.png 150w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2023\/05\/GitHub-Mark-500x500.png 500w\" sizes=\"(max-width: 100px) 100vw, 100px\" \/><\/div><\/div><div class=\"vlp-layout-zone-main\"><div class=\"vlp-block-0 vlp-link-title\">ExternalSMTPforwarding.ps1<\/div><div class=\"vlp-block-1 vlp-link-summary\">This script can be executed without prior customization.<br \/>\nThis script is used to create external SMTP forwarding in Exchange Online (bulk) with PowerShell<\/div><\/div><\/div>\n<p>\u00a0<\/p>\n<p>You can find details about the script in the corresponding README in the repository. Basically, the script can be executed without modification.<br \/>\nThe required CSV file needs the following values:<br \/>\n<strong>\u201cName\u201d, \u201cSMTPold\u201d, \u201cSMTPnew\u201d<\/strong><\/p>\n<p>\u00a0<\/p>\n<p>I hope this article prevents future headaches \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Especially during a messaging migration, situations may arise where external message forwarding has to be set up for several users. One of the reasons, given as an example, may be that the affected users have to be migrated to a new tenant and a new primary SMTP has to be used on this tenant. To [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5526,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[1923,2,3],"tags":[],"class_list":["post-5522","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-365","category-exchange","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5522","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=5522"}],"version-history":[{"count":3,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5522\/revisions"}],"predecessor-version":[{"id":5525,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/5522\/revisions\/5525"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/5526"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=5522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=5522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=5522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}