Skip to content

Check which mailboxes are in sync with Office 365

If you have thousands of mailboxes to migrate, you like to check which mailboxes are in sync with Office 365. This way, you can know which mailboxes you still have to migrate to Office 365. How will we accomplish that? In this article, you will learn how to check which mailboxes are in sync with Office 365.

Check which mailboxes are in sync with Office 365 in Exchange Management Console

In Exchange Server 2010, we can see which mailboxes are moving in the Exchange Management Console. In the Display Name column, we can see the icon change to a Move Request icon. It means that the mailbox is moving/syncing.

You can also add the column Move Request Type. Check if the move request type shows remote, local, or empty value:

  • Local means it’s going to another mailbox database in the organization. For example, the mailbox is moving from the mailbox database DB01 to DB02.
  • Remote means it’s going to an external domain. For example, the mailbox is moving to Office 365.
  • Empty means that there is no mailbox move happening at the moment.
Check which mailboxes are in sync with Office 365 Exchange Management Console

Exchange 2013 and higher no longer have the Exchange Management Console like Exchange 2010. Instead, it changed to a web-based named Exchange Admin Center.

Check which mailboxes are in sync with Office 365 Exchange Admin Center

What to do if you don’t have an Exchange Server 2010 running in the organization? How do we check which mailboxes are in sync with Office 365? The answer is PowerShell.

Get all mailboxes

Run Exchange Management Shell as administrator. In the first cmdlet, we will get the information. In the second cmdlet, we will export the results to a CSV file. Create a temp folder if you don’t have one in the C: drive or change the path in the second cmdlet.

List all mailboxes in the Exchange organization. A mailbox in sync with Office 365 will show a value in the MailboxMoveRemoteHostName column. The empty values mean that the mailbox is not in sync with Office 365.

[PS] C:\>Get-Mailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname

DisplayName       MailboxMoveRemoteHostName  RecipientTypeDetails
-----------       -------------------------  --------------------
Jack Slater                                           UserMailbox
Amanda Morgan                                         UserMailbox
HR                                                  SharedMailbox
Christopher Payne exoip.onmicrosoft.com               UserMailbox
Mary Walsch       exoip.onmicrosoft.com               UserMailbox
Sales             exoip.onmicrosoft.com             SharedMailbox
Finance           exoip.onmicrosoft.com             SharedMailbox
Support           exoip.onmicrosoft.com             SharedMailbox
Room Tokyo        exoip.onmicrosoft.com               RoomMailbox
Dylan Piper       exoip.onmicrosoft.com               UserMailbox


[PS] C:\>Get-Mailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname | Export-Csv "C:\temp\All_Mailboxes.csv" -Encoding UTF8 -NTI

Filter mailbox results with -RecipientTypeDetails parameter

We will make use of the -RecipientTypeDetails parameter to filter by a specified mailbox. We can filter on:

  • DiscoveryMailbox
  • EquipmentMailbox
  • GroupMailbox
  • LegacyMailbox
  • LinkedMailbox
  • LinkedRoomMailbox
  • RoomMailbox
  • SchedulingMailbox
  • SharedMailbox
  • TeamMailbox
  • UserMailbox

Filter on user mailbox

Filter the results only on user mailboxes.

[PS] C:\>Get-Mailbox -RecipientTypeDetails UserMailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname

DisplayName       MailboxMoveRemoteHostName  RecipientTypeDetails
-----------       -------------------------  --------------------
Jack Slater                                           UserMailbox
Amanda Morgan                                         UserMailbox
Christopher Payne exoip.onmicrosoft.com               UserMailbox
Mary Walsch       exoip.onmicrosoft.com               UserMailbox
Dylan Piper       exoip.onmicrosoft.com               UserMailbox


[PS] C:\>Get-Mailbox -RecipientTypeDetails UserMailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname | Export-Csv "C:\temp\User_Mailboxes.csv" -Encoding UTF8 -NTI

Filter on shared mailbox

Do the same as the previous step. This time filter only on shared mailboxes.

[PS] C:\>Get-Mailbox -RecipientTypeDetails SharedMailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname

DisplayName  MailboxMoveRemoteHostName  RecipientTypeDetails
-----------  -------------------------  --------------------
HR                                             SharedMailbox
Sales        exoip.onmicrosoft.com             SharedMailbox
Finance      exoip.onmicrosoft.com             SharedMailbox
Support      exoip.onmicrosoft.com             SharedMailbox


[PS] C:\>Get-Mailbox -RecipientTypeDetails SharedMailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname | Export-Csv "C:\temp\Shared_Mailboxes.csv" -Encoding UTF8 -NTI

Filter on user mailbox and shared mailbox

Filter the results on user mailbox and shared mailbox. Separate the values by commas.

[PS] C:\>Get-Mailbox -RecipientTypeDetails UserMailbox,SharedMailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname

DisplayName       MailboxMoveRemoteHostName  RecipientTypeDetails
-----------       -------------------------  --------------------
Jack Slater                                           UserMailbox
Amanda Morgan                                         UserMailbox
HR                                                  SharedMailbox
Christopher Payne exoip.onmicrosoft.com               UserMailbox
Mary Walsch       exoip.onmicrosoft.com               UserMailbox
Sales             exoip.onmicrosoft.com             SharedMailbox
Finance           exoip.onmicrosoft.com             SharedMailbox
Support           exoip.onmicrosoft.com             SharedMailbox
Dylan Piper       exoip.onmicrosoft.com               UserMailbox


[PS] C:\>Get-Mailbox -RecipientTypeDetails UserMailbox,SharedMailbox -Resultsize Unlimited | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname | Export-Csv "C:\temp\User_Shared_Mailboxes.csv" -Encoding UTF8 -NTI

Get all mailboxes in sync with Office 365

Filter the mailboxes and check which are in sync with Office 365.

[PS] C:\>Get-Mailbox -Resultsize Unlimited | Where-Object {$_.MailboxMoveRemoteHostName -like "*.onmicrosoft.com"} | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname

DisplayName       MailboxMoveRemoteHostName  RecipientTypeDetails
-----------       -------------------------  --------------------
Christopher Payne exoip.onmicrosoft.com               UserMailbox
Mary Walsch       exoip.onmicrosoft.com               UserMailbox
Sales             exoip.onmicrosoft.com             SharedMailbox
Finance           exoip.onmicrosoft.com             SharedMailbox
Support           exoip.onmicrosoft.com             SharedMailbox
Room Tokyo        exoip.onmicrosoft.com               RoomMailbox
Dylan Piper       exoip.onmicrosoft.com               UserMailbox


[PS] C:\>Get-Mailbox -Resultsize Unlimited | Where-Object {$_.MailboxMoveRemoteHostName -like "*.onmicrosoft.com"} | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname | Export-Csv "C:\temp\Mailboxes_In_Sync.csv" -Encoding UTF8 -NTI

Get all mailboxes not in sync with Office 365

Filter the mailboxes and check which are not in sync with Office 365.

[PS] C:\>Get-Mailbox -Resultsize Unlimited | Where-Object {$_.MailboxMoveRemoteHostName -like $null} | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname

DisplayName   MailboxMoveRemoteHostName  RecipientTypeDetails
-----------   -------------------------  --------------------
Jack Slater                                       UserMailbox
Amanda Morgan                                     UserMailbox
HR                                              SharedMailbox


[PS] C:\>Get-Mailbox -Resultsize Unlimited | Where-Object {$_.MailboxMoveRemoteHostName -like $null} | Select-Object DisplayName, MailboxMoveRemoteHostName, RecipientTypeDetails | Sort-Object MailboxMoveRemoteHostname | Export-Csv "C:\temp\Mailboxes_Not_In_Sync.csv" -Encoding UTF8 -NTI

Great to know which mailboxes are not in sync with Office 365. We can proceed further and move the mailboxes to Office 365.

Keep reading: Search and delete email from Exchange user mailbox »

Conclusion

You learned how to check which mailboxes are in sync with Office 365. It’s good to know which mailboxes are in sync and which mailboxes are not in sync. After you export the results to a CSV file, start migrating mailboxes to Office 365, which are not in sync.

Did you enjoy this article? You may also like Force sync Azure AD Connect with PowerShell. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *