Welcome back to Removing Your Last Exchange Server blog series. In part two Remote Recipient Commands, we summarised the actions available for the Recipient Management PowerShell Commands, such as “get”, “set”, “enable” and “remove.”
For the third and final part of this series we will be reviewing the more common commands you will likely be using regularly to manage your recipients synced from on-premises to M365.
RemoteMailbox
When you finally remove your last Exchange server, the most common scenarios you will likely encounter will deal with managing your remote mailboxes. My colleague, Aaron Parker, also wrote a blog about using the Enable-RemoteMailbox Command which I highly recommend.
From the perspective of your on-premises environment, all of your mailboxes will now be M365 mailboxes…remote mailboxes.
The most likely scenario will be when you are creating new user accounts. Often my customers have first created the AD user account in Active Directory and then executed the following command to enable an M365 mailbox for the user:
Enable-RemoteMailbox -Identity “Ted Williams” -RemoteRoutingAddress TedWilliams@GreatestHitter.mail.onmicrosoft.com
The above command will take the AD user “Ted Williams” and add the Exchange attributes to his user account. Upon a successful sync to M365, M365 will create a mailbox for Ted Williams. Remember to license the user in M365! In some cases, you may want to review the properties of a remote mailbox. To do so, you can run the following command:
Get-RemoteMailbox -Identity “Ted Williams” | FL
This will provide all the attributes for the specified user.
Remove-RemoteMailbox vs Disable-RemoteMailbox
Please note Disable-RemoteMailbox will disable the user’s M365 mailbox but keep the on-premises AD account. Remove-RemoteMailbox only applies to shared mailboxes in the cloud. It will delete both the shared mailbox and the associated on-premises AD account.
To remove the mailbox but keep the AD account:
Disable-RemoteMailbox “Derek Jeter”
Derek Jeter will still have an AD user account, but his mailbox will be deleted by M365.
To delete a user in AD and its mailbox, I would recommend following the easiest method, which is to delete the AD object. This will remove the mailbox from M365 upon the next sync.
Conclusion
As you would have noted throughout this blog series, there are several commands which come with the Remote Recipients management toolset. It may seem overwhelming at first if you’re used to using a GUI, but over time you will become comfortable with the process of managing your remote recipients from on-premises. Heck, you may even decide to script your user onboarding process through scripting. Go crazy!
If you would like Insentra’s IT Migrations to help your company with removing your last Exchange server in your hybrid configuration, please contact us.