Merge Office 365 mailboxes

The Problem

So John is leaving the organisation, and his replacement (Fred) wants all of his emails accessible without the need to have a separate mailbox. Fred might also want John’s emails coming directly to his mailbox.

This scenario assumes that you don’t want to do an identity change (if that’s too much of a hassle).

The Fix

Merge the two mailboxes with PowerShell commands!

Note that executing user must be a member of the Discovery Management Admin Role Group plus Mailbox Search.

The following command will move John’s emails to Fred’s inbox in a folder called “Johnsmail”

Search-Mailbox -Identity “john@allitsolutions.com.au” -TargetMailbox “fred@allitsolutions.com.au” -TargetFolder “Johnsmail” -LogLevel Full

Note that this operation will only work for up to 10,000 items.

If you want to move the items , run this command and make sure you are a part of the “Mailbox Import Export” management role. Without the “-DeleteContent” switch, it will copy the items.

Search-Mailbox -Identity “john@allitsolutions.com.au” -TargetMailbox “fred@allitsolutions.com.au” -TargetFolder “Johnsmail” -LogLevel Full -DeleteContent

 

If you want to check how many items are in John’s mailbox, then run the following:

search-mailbox -Identity john@allitsolutions.com.au -EstimateResultOnly

>10,000 Results?

 

Create the search:

New-MailboxSearch -Name “John to Fred” -SourceMailboxes john@allitsolutions.com.au -TargetMailbox fred@allitsolutions.com.au -LogLevel Full

 

Execute the copy:

Get-MailboxSearch “John to Fred” | Start-MailboxSearch

 

If you need to check the status, run:

Get-MailboxSearch -Identity "John to Fred" | FL status

 

 

If you need any reference to these switches, check out:

Search-Mailbox

New-MailboxSearch