{"id":3966,"date":"2020-02-03T11:49:31","date_gmt":"2020-02-03T09:49:31","guid":{"rendered":"https:\/\/www.msb365.blog\/?p=3966"},"modified":"2023-06-23T13:04:31","modified_gmt":"2023-06-23T11:04:31","slug":"exchange-online-powershell","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=3966","title":{"rendered":"Restoring a Hybrid Exchange Environment"},"content":{"rendered":"<h2><strong>Prolog<\/strong><\/h2>\n<p>Recently, I have been getting inquiries from customers, who have the following scenario:<\/p>\n<p>The environment was originally an on-premises infrastructure. Then the customers have decided to switch to Office 365 and implemented this step as follow:<\/p>\n<p>&nbsp;<\/p>\n<p>The AAD was configured to sync the user accounts to the cloud, but without the Exchange attributes.\u00a0 The user accounts synced to the cloud where then assigned an Office 365 E3 (or E5) license.<\/p>\n<p>However, since Azure AD did not see any Exchange attributes, online mailboxes were created for the User Exchange.<\/p>\n<p>That means that all users now have a new empty mailbox, which they use after the cutover.<\/p>\n<p>Then the mail content was migrated with a third-party tool from the &#8220;old&#8221; on-premise mailbox to the &#8220;new&#8221; Exchange online mailbox.<\/p>\n<p>The mail relaying for on-premise applications or hardware was made with an IIS SMTP service or the Exchange online was directly connected.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Problem<\/strong><\/h2>\n<p>These configurations basically work well, modifications like mailbox permissions on the mailboxes can be made directly on Exchange online. However, if you need to make a modification to the SMTP address, you have to do this in the Local Active Directory and then sync the change via the AAD.<\/p>\n<p>It can lead to problems that when entering smtp addresses in the Active directory, this can not be easily followed if it is already in use.<\/p>\n<p>Another drawback is that there is no longer a local exchange server that can do the relaying for the on-premise applications that are not able to communicate directly with the cloud.<\/p>\n<p>Therefore, third party tools are used for this standard function, which have to be managed separately.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Solution \u2013 the long way<\/strong><\/h2>\n<p>The customers, who have approached me, now want to have a standardized and Microsoft supported state again. Not least because Microsoft does not charge any Exchange license fees for an Exchange 2016 server if it is used as a hybrid only server. (This only works with Exchange 2016, Exchange 2019 does not have this license option. What must be taken into account is that the Windows Server license must be present)<\/p>\n<p>&nbsp;<\/p>\n<p>To restore this state, the following points must be performed:<\/p>\n<p>&#8211; The Exchange Recipient Display Type must be adjusted per mailbox<\/p>\n<p>&#8211; The Exchange Recipient Type Details per mailbox must be adjusted<\/p>\n<p>&#8211; The Exchange mailbox type must be adjusted<\/p>\n<p>&#8211; The Exchange GUID must be merged<\/p>\n<p>&#8211; The routing address per mailbox must be adjusted<\/p>\n<p>&#8211; (Recommended) Adjusting the UPN to firstname.surname<\/p>\n<p>&#8211; The Exchange HCW must be executed<\/p>\n<p>&nbsp;<\/p>\n<p>Afterwards, the AAD connect must be reconfigured and then the infrastructure is in a standardised state again.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Solution \u2013 the easy way<\/strong><\/h2>\n<p>So that this can be done faster and in a standardized way, I have written a script that does these tasks for me. The script can be <strong><a href=\"https:\/\/gallery.technet.microsoft.com\/Script-for-the-modification-acb09ab3\" target=\"_blank\" rel=\"noopener noreferrer\">downloaded in the Technet Gallery<\/a><\/strong> and is available for free.<\/p>\n<p>I will talk about the script handling later in this article.<\/p>\n<p>But before you use it, I recommend to read the next chapter.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Pre Tasks<\/strong><\/h2>\n<p>Before we start with the transformation and unification of the mailboxes, it should be noted that we are making one or two preparations in our on-premise Active Directory.<\/p>\n<p>If your company uses Outlook from the Office 365 package, the following settings are not mandatory, but recommended:<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Modify the internal DNS Record for Autodiscover <\/strong><\/h3>\n<p>In hybrid mode, your SMTP domain of course &#8220;belongs&#8221; to the local server and accordingly Autodiscover must be set locally.<\/p>\n<p>In the opposite direction, Microsoft has made it easy. Autodiscover from an on-premises Exchange Server to Exchange Online occurs only for the SMTP domain &#8220;%tenantname%.mail.onmicrosoft.com&#8221;, which is entered as the forwarding address for on-premises users.<\/p>\n<p>The easiest way is to point the Internal DNS entry from Autodiscover to Exchange Online. To do this, the following entry must be made: https:\/\/outlook.office365.com\/autodiscover\/autodiscover.xml<\/p>\n<p>Alternatively, it is also possible to set a key via Registry, that the client should no longer use Autodiscover. This is because Autodiscover is actually no longer so important for Outlook. The Registry setting looks like this:<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"\">Windows Registry Editor Version 5.00\r\n\r\n[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Office\\16.0\\Outlook\\AutoDiscover]\r\n\"ExcludeExplicitO365Endpoint\"=dword:00000001<\/pre>\n<p>&nbsp;<\/p>\n<h3><strong>Modify the external Autodiscover Record<\/strong><\/h3>\n<p>This point should be adjusted from the beginning. I describe it only for the reason that this article is complete.<\/p>\n<p>However, the public DNS entry of the mail domain must be set to the public autodiscover of Office 365. Here it is the same entry as the internal DNS: https:\/\/outlook.office365.com\/autodiscover\/autodiscover.xml<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Modify an SCP deny for the Clients<\/strong><\/h3>\n<p>Autodiscover was the lowest priority in the hierarchy regarding the Outlook connection. More important is the Service Connection Point for Exchange (SCP)<\/p>\n<p>Tip: The current SCP settings can be viewed in the Active Directory Sites and Services. To do so, you have to use the following path:<\/p>\n<p>expand Services from the console root &gt; <strong>Microsoft Exchange<\/strong> &gt; <strong>Organization Name<\/strong> &gt; <strong>Administrative Groups<\/strong> &gt; <strong>Exchange Administrative Group<\/strong> &gt; <strong>Servers<\/strong> &gt; select the CAS server and expand\u00a0 &gt; <strong>Protocols<\/strong> &gt; <strong>AutoDiscover<\/strong> &gt; Right click on the Server Name in the right panel and click Properties as show below.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/1-1.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-3969\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/1-1.png\" alt=\"\" width=\"927\" height=\"672\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/1-1.png 927w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/1-1-300x217.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/1-1-768x557.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/1-1-600x435.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/1-1-905x656.png 905w\" sizes=\"(max-width: 927px) 100vw, 927px\" \/> <\/a><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/2-1.png\">\u00a0<img decoding=\"async\" class=\"alignnone size-full wp-image-3972\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/2-1.png\" alt=\"\" width=\"412\" height=\"465\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/2-1.png 412w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/2-1-266x300.png 266w\" sizes=\"(max-width: 412px) 100vw, 412px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>However, as we have seen in the image example, the SCP points to the local Exchange infrastructure.<\/p>\n<p>In the next step I will show you how to disable SCP via the Registry. Similar to the autodiscover it depends on the Office (Outlook) version. Here is a short overview of the versioning:<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"301\">Version Name<\/td>\n<td width=\"301\">Version Number<\/td>\n<\/tr>\n<tr>\n<td width=\"301\">Office 2007<\/td>\n<td width=\"301\">12.0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\">Office 2010<\/td>\n<td width=\"301\">14.0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\">Office 2013<\/td>\n<td width=\"301\">15.0<\/td>\n<\/tr>\n<tr>\n<td width=\"301\">Office 2016<\/td>\n<td width=\"301\">16.0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<p>As already mentioned at the beginning, this does not have to be done for the Office 365 version, because this is by default the first direction Office 365 connected.<\/p>\n<p>&nbsp;<\/p>\n<p>In the Registry Editor we have to browse to the following path:<\/p>\n<pre class=\"\">[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Office\\&lt;Office_Version&gt;\\Outlook\\AutoDiscover]<\/pre>\n<p>then we create a new &#8220;<strong>DWord Value<\/strong>&#8221; entry with the name &#8220;<strong>ExcludeScpLookup<\/strong>&#8220;.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/3-1.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-3971\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/3-1.png\" alt=\"\" width=\"797\" height=\"456\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/3-1.png 797w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/3-1-300x172.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/3-1-768x439.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/3-1-600x343.png 600w\" sizes=\"(max-width: 797px) 100vw, 797px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>In the next step we open the newly created entry and set the value &#8220;<strong>1<\/strong>&#8221; as hexadecimal base and confirm with <strong>OK<\/strong><\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/4-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3974\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/4-1.png\" alt=\"\" width=\"878\" height=\"452\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/4-1.png 878w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/4-1-300x154.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/4-1-768x395.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/4-1-600x309.png 600w\" sizes=\"(max-width: 878px) 100vw, 878px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<blockquote><p>Tip one:<\/p>\n<p>You can also copy the below code to a text file, rename it with .reg extension and double click to merge with your registry. Make sure that you replace the version number X.0 by referring the table above.<\/p><\/blockquote>\n<pre class=\"\">Windows Registry Editor Version 5.00\r\n\r\n[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Office\\X.0\\Outlook\\AutoDiscover]\r\n\"ExcludeScpLookup\"=dword:00000001<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>Tip two:<\/p>\n<p>This registry entry can be distributed very well via GPO. I personally prefer this way.<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Inform the users (Mobile device settings)<\/strong><\/h3>\n<p>This step is always optional and only necessary depending on the environment.<\/p>\n<p>Since the initial scenario is such that all users are already working with the Exchange online mailbox, the mobile devices would also have to point to the cloud.<\/p>\n<p>However, depending on the circumstances, it may also be the case that there are devices that are not configured correctly. These would then have to be adapted so that they also point to the Exchange online mailbox.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>The Script<\/strong><\/h2>\n<p>Now let&#8217;s have a look at the script itself, as i have mentioned earlier in this article, the script can be downloaded for free from the Microsoft Technet Gallery.<\/p>\n<p>However, when we have completed all pre tasks, we can start the script from the Exchange Management Shell. The script does not need to be modified before use! All individual details will be requested after the start.<\/p>\n<p>After the script is started, we are asked to specify the primary mail domain.<\/p>\n<p>After that we are asked to enter the Exchange online routing address as second entry. This usually looks like this: &#8220;%tenantname%.mail.onmicrosoft.com&#8221;.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3976\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1.png\" alt=\"\" width=\"1075\" height=\"526\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1.png 1075w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1-300x147.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1-1024x501.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1-768x376.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1-600x294.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/5-1-905x443.png 905w\" sizes=\"(max-width: 1075px) 100vw, 1075px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>After these two entries have been made, we will be asked to enter our Office 365 (Exchange online) credentials. These credentials are needed so that the script can establish a remote powershell session to the Office 365 Tenant and later read the Exchange GUID of the online mailboxes. No entries are changed online on the Exchange during the entire execution of the script.<\/p>\n<p>The following points should therefore be noted:<\/p>\n<p>&#8211; The specified account requires the appropriate permissions to read the required information from Exchange online.<\/p>\n<p>&#8211; The script currently does not work with MFA. therefore, it should be an account that is not MFA enabled.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3977\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1.png\" alt=\"\" width=\"1079\" height=\"526\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1.png 1079w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1-300x146.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1-1024x499.png 1024w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1-768x374.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1-600x292.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/6-1-905x441.png 905w\" sizes=\"(max-width: 1079px) 100vw, 1079px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now all necessary entries are done. Now the script collects all user mailboxes, which are available on the on-premise Exchange infrastructure and lists them in the Management Shell.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/7-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3978\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/7-1.png\" alt=\"\" width=\"860\" height=\"253\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/7-1.png 860w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/7-1-300x88.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/7-1-768x226.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/7-1-600x177.png 600w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>In this step the current homeMDB, homeMTA&#8217;s etc. are reseted.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/8-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3979\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/8-1.png\" alt=\"\" width=\"534\" height=\"35\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/8-1.png 534w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/8-1-300x20.png 300w\" sizes=\"(max-width: 534px) 100vw, 534px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>After all on-premise user mailboxes have been read, they are now converted to remote mailboxes.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/9-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3980\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/9-1.png\" alt=\"\" width=\"519\" height=\"35\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/9-1.png 519w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/9-1-300x20.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/9-1-500x35.png 500w\" sizes=\"(max-width: 519px) 100vw, 519px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>In this step we set the individual routing address for each user mailbox (or new remote mailbox).<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3981\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/10.png\" alt=\"\" width=\"466\" height=\"36\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/10.png 466w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/10-300x23.png 300w\" sizes=\"(max-width: 466px) 100vw, 466px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now the script establishes a connection to Exchange online. Here it is extremely important that the credentials we set at the beginning are correct and correspond to the specifications.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/11-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3982\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/11-1.png\" alt=\"\" width=\"957\" height=\"147\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/11-1.png 957w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/11-1-300x46.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/11-1-768x118.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/11-1-600x92.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/11-1-905x139.png 905w\" sizes=\"(max-width: 957px) 100vw, 957px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>After successful connection to Exchange online, the Exchange GUID is read from the Exchange online mailbox and written to the on-premise mailbox.<\/p>\n<p>As you can see in the screenshot, all successful merges are displayed in green and if there are problems, the corresponding message is displayed in yellow.<\/p>\n<p>This helps in the post-processing of the automated process.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3983\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/12.png\" alt=\"\" width=\"658\" height=\"580\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/12.png 658w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/12-300x264.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/12-600x529.png 600w\" sizes=\"(max-width: 658px) 100vw, 658px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>At the end, the script automatically refers to the next step, which must now be executed.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/13-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3984\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/13-1.png\" alt=\"\" width=\"960\" height=\"120\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/13-1.png 960w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/13-1-300x38.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/13-1-768x96.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/13-1-600x75.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/13-1-905x113.png 905w\" sizes=\"(max-width: 960px) 100vw, 960px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Last Steps<\/strong><\/h2>\n<p>Now that everything on the mailbox page has been cleaned up, it&#8217;s time to adjust the sync process and run the Hybrid configuration wizard.<\/p>\n<p>&nbsp;<\/p>\n<h3><strong>Exchange HCW and re-configure AAD<\/strong><\/h3>\n<p><strong>\u00a0<\/strong>It is important at this point that the on-premise Exchange Server version is updated to the latest version. This maintains a Microsoft supported state and simplifies troubleshooting.<\/p>\n<p>After we have started the Hybrid Configuration Wizard (HCW), we select the option &#8220;Minimal Hybrid Configuration&#8221;.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3986\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/14.png\" alt=\"\" width=\"522\" height=\"473\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/14.png 522w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/14-300x272.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>On the <strong>User Provisioning<\/strong> page, select <strong>Synchronize my users and passwords one time<\/strong>.<\/p>\n<p>At this point you are prompted to download and install the <strong>Azure AD Connect wizard<\/strong> to synchronize your users from on-premises to Office 365.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/15.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3987\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/15.png\" alt=\"\" width=\"522\" height=\"466\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/15.png 522w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/15-300x268.png 300w\" sizes=\"(max-width: 522px) 100vw, 522px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Here we can run it and we can choose the default options for the <strong><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/active-directory\/hybrid\/how-to-connect-install-express\" target=\"_blank\" rel=\"noopener noreferrer\">Express settings<\/a><\/strong>.<\/p>\n<p>By configuring the AAD, we need to have an eye on the option \u201c<strong>Exchange hybrid deployment<\/strong>\u201d this <strong><u>has to be selected<\/u><\/strong> in our case.<\/p>\n<p><a href=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3988\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/16.png\" alt=\"\" width=\"879\" height=\"619\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/16.png 879w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/16-300x211.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/16-768x541.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2019\/12\/16-600x423.png 600w\" sizes=\"(max-width: 879px) 100vw, 879px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2><strong>Conclusion<\/strong><\/h2>\n<p>As we could see in this article, there is a lot to do in such a task. There may be several reasons why such a starting position was originally created. One of them I have described in this article.<\/p>\n<p>Other reasons can also be attacks on one&#8217;s own infrastructure or disasters like a fire that makes an on-premise infrastructure impossible.<\/p>\n<p>It is important to know that it is possible to rebuild an intact hybrid environment, also from the Exchange online perspective.<\/p>\n<p>Good planning is therefore very important.<\/p>\n<p><strong><a href=\"https:\/\/gallery.technet.microsoft.com\/Script-for-the-modification-acb09ab3\" target=\"_blank\" rel=\"noopener noreferrer\">My script<\/a><\/strong>, which is used here should be a simplification and relief for all of you who are facing such a challenge.<\/p>\n<p>&nbsp;<\/p>\n<p>I wish you success<\/p>\n<p>&#x1f60a;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Photo by\u00a0<a href=\"https:\/\/unsplash.com\/@drscythe?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Dominik Scythe<\/a>\u00a0on\u00a0<a href=\"https:\/\/unsplash.com\/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText\">Unsplash<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prolog Recently, I have been getting inquiries from customers, who have the following scenario: The environment was originally an on-premises infrastructure. Then the customers have decided to switch to Office 365 and implemented this step as follow: &nbsp; The AAD was configured to sync the user accounts to the cloud, but without the Exchange attributes.\u00a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3967,"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":[685,1923,2,3],"tags":[],"class_list":["post-3966","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-active-directory","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\/3966","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=3966"}],"version-history":[{"count":9,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/3966\/revisions"}],"predecessor-version":[{"id":4839,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/3966\/revisions\/4839"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/3967"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3966"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3966"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3966"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}