-->

Saturday, March 25, 2017

Exchange Convert Linked Mailbox to MailUser

In my current Exchange 2016 environment we run two resource forests, which means we have to sync accounts and contacts by using MIM 2016 (Microsoft Identity Manager).
Early on in the configuration, some Linked mailboxes were created in the wrong forest, and those needed to be MailUser accounts instead.

How I found this out was: mail from people in my forest was being delivered to the user's mailbox (which was mistakenly created) in my forest instead of the user's primary mailbox in the other forest.

To convert it, we'll need to break the link from the mailbox to the master account, disable the mailbox, and enable the MailUser.
This has no affect on the primary mailbox, so it's safe.

You can't do the first step in the EAC, so we'll be using PowerShell...which is faster and way more fun anyhow!

Fire up the Exchange Management Shell (EMS) and run the following cmdlets:

First, we'll remove the mailbox-to-master account link:

Get-Mailbox "mailbox name" | Set-User -LinkedMasterAccount $null

Next, we'll disable the mailbox:

Disable-Mailbox "mailbox name" -Confirm $false

Now, we'll enable the MailUser:

Enable-MailUser "user name" -ExternalEmailAddress emailaddress@otherresourceforest.com

**Note** You'll need to change "mailbox name", "user name", and "emailaddress@otherresourceforest.com" to match your environment.

And there you have it; mail will be delivered to the user's mailbox in the other forest.

If I have time, I might make this into a script...so stay tuned! Or if any of you readers wanna do it, post it up in the comments :)

No comments:

Post a Comment