Home ยป Exchange Server ยป Using Test-MAPIConnectivity to Test Exchange Server Databases

Using Test-MAPIConnectivity to Test Exchange Server Databases

How can you test your Exchange Server databases to see whether they are online and responding to client requests? You could use Outlook to connect to a mailbox on the database, but if you have a lot of databases to test that is not going to be very efficient.

Exchange Server 2013 (as well as 2007 and 2010) have the Test-MAPIConnectivity cmdlet available in the Exchange Management Shell. As the name suggests, this cmdlet allows you to test the MAPI connectivity to the database.

To test all the databases in the organization you can pipe the output from Get-MailboxDatabase into Test-MAPIConnectivity.

To test the databases on a single Mailbox server use the -Server parameter. In a database availability group this will test all of the active mailbox database copies for that Mailbox server.

To test one specific database use the -Database parameter.

Paul is a Microsoft MVP for Office Servers and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul is a co-author of Office 365 for IT Pros and several other books, and is also a Pluralsight author.
Category: Exchange Server

7 comments

  1. Arras says:

    I was looking for something like this.

    I have a DB that I moved all the mailboxes to another one. It had a white space of 100GB, so I dismounted ran defrag and went I try to mounted again it wouldn’t mount. I ran a repair and still nothing. I then moved the Translogs to a temp location and was able to mount it.
    Then later someone added a new user and placed it on the questionable DB. Well the mailbox was not accessible. I deleted the mailbox and created a new one in a different DB. So I been trying to find out what’s wrong with this DB. Also I cannot delete it because it has arbitration mailboxes, different story.
    I ran the command and I get this:
    MailboxServer Database Result Error
    ————- ——– —— —–
    Server DB01 *FAILURE* [Microsoft.Exchange.Data.Storage.ObjectNotFoundException]: The process failed to get the correct properties. Inner error [M…

      • Arras says:

        I finally was able to delete the DB. The problem was it had all the arbitration mailboxes and 1 system mailbox. The problem was that all these mailboxes were on the parent domain, but I found the solution by using
        Get-Mailbox -Arbitration -DomainController “ServerName” | New-MoveRequest -TargetDatabase “db” -DomainController “ServerName”.

        The key was -DomainController at the beginning and at the end switch.

  2. Rusty Shackleford says:

    I have 21 databases so I use the following which is more about the status of the database versus each individual mailbox:
    Get-MailboxDatabase | get-mailbox -ResultSize 1 | Test-MAPIConnectivity | ft

    I follow a similar format when testing searches…….
    Get-MailboxDatabase | get-mailbox -ResultSize 1 | Test-ExchangeSearch | ft

    Peace.

      • Rusty Shackleford says:

        Hmmm?!?!?!? It appears that I took the long way to get the results. Defaulting to the system mailbox gets the results considerably faster. Thanks for the reminder why I subscribe to your RSS feeds ๐Ÿ™‚

        Peace.

Leave a Reply

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