The Test-MAPIConnectivity PowerShell cmdlet will test the availability and latency of your mailbox databases and help you to troubleshoot issues with mailbox access.

Running Test-MAPIConnectivity on an Exchange 2013 Mailbox server will test the active mailbox databases on that server.

[PS] C:\>Test-MAPIConnectivity

MailboxServer      Database           Result    Error
-------------      --------           ------    -----
E15MB2             Mailbox Database 2 Success

You can also specify a remote Mailbox server to test all of the active databases on that server.

[PS] C:\>Test-MAPIConnectivity -Server E15MB1

MailboxServer      Database           Result    Error
-------------      --------           ------    -----
E15MB1             Mailbox Database 1 Success

Notice what happens if a Mailbox server with no active databases is tested.

[PS] C:\>Test-MAPIConnectivity -Server E15MB3
WARNING: The operation could not be performed because no mailbox database is currently hosted on server E15MB3.

The test will use the system mailbox on each database, but you can also specify a mailbox and the test will run on whichever database that mailbox is hosted on. This is useful if you have a need to verify connectivity for a specific mailbox.

[PS] C:\>Test-MAPIConnectivity -Identity paul.cunningham

MailboxServer      Database           Result    Error
-------------      --------           ------    -----
E15MB1             Mailbox Database 1 Success

Individual mailbox databases can also be tested directly.

[PS] C:\>Test-MAPIConnectivity -Database "Mailbox Database 1"

MailboxServer      Database           Result    Error
-------------      --------           ------    -----
E15MB1             Mailbox Database 1 Success

And of course you can use the pipeline to test multiple databases at the same time. You can also pipe the output to Format-List to see more details, such as the latency recorded by the test.

[PS] C:\>Get-MailboxDatabase | Test-MAPIConnectivity | fl

RunspaceId  : d02eb1e1-f94c-48ee-9384-b99b0654be4a
Server      : E15MB1
Database    : Mailbox Database 1
Mailbox     : SystemMailbox{a24b3b31-8f3b-4164-8e5c-bd68426fd53e}
MailboxGuid : 80d382a3-1017-4530-8c80-7ee4a40d208b
IsArchive   : False
Result      : Success
Latency     : 00:00:00.0221344
Error       :
Identity    :
IsValid     : True
ObjectState : New

RunspaceId  : d02eb1e1-f94c-48ee-9384-b99b0654be4a
Server      : E15MB2
Database    : Mailbox Database 2
Mailbox     : SystemMailbox{b53f08b3-b4cb-4f05-a1c1-3c9e71277527}
MailboxGuid : 5bf1697f-2cb2-4c32-93df-f49ac5885cd5
IsArchive   : False
Result      : Success
Latency     : 00:00:00.0135938
Error       :
Identity    :
IsValid     : True
ObjectState : New

If necessary you can override the default latency threshold of 90 seconds and specify your own value (in seconds).

[PS] C:\>Get-MailboxDatabase | Test-MAPIConnectivity -AllConnectionsTimeout 120

Tip: When someone asks me “Hey, is there something wrong with Exchange?”, one of the first cmdlets I will run is Test-MAPIConnectivity.

About the Author

Paul Cunningham

Paul is a former Microsoft MVP for Office Apps and Services. He works as a consultant, writer, and trainer specializing in Office 365 and Exchange Server. Paul no longer writes for Practical365.com.

Comments

  1. binimele

    Test-MAPIConnectivity
    MailboxServer Database Result Error
    ————- ——– —— —–
    EXCHGSRV-01 EEP_DirectorsAndMa *FAILURE* No mailbox was found to perform the transaction. You may need to wait for Active Directory replication to
    nagers complete.

  2. nithyanandham

    Hello Paul ,

    Thanks for the article .

    Please correct me if i am wrong .

    In exchange 2013 all the outlook client connectivity will happen through outlook anywhere i.e (rpc over http) and also with MAPI over http on the case where the client is with outlook 2013 and latest service packs .Especially MAPI protocol is not aware for exchange 2013 products .

    So such case how could we use the test-mapiconnectivity command to check the issue on the mailbox access in exchange 2013 .

    Correct me if anything is wrong.

    1. Avatar photo
      1. nithyanandham

        Hello Paul ,

        Thanks for the prompt reply .

        In exchange 2010 we can make use of the below mentioned command to check the outlook client connectivity

        test-mapiconnectivity -identity “name of the user” | ft -au

        For exchange 2013 Could you please share me exchange management shell command to check the outlook client connectivity that happens either through RPC over HTTP or MAPI over HTTP ?

        Also i would like you to share me the exact link on where i can ask exchange related questions in exchangeserverpro forum ?

        Note : Really your blogs are more informative 🙂 and i would like to learn a lot from your blogs please keep on doing the best .

  3. Ricardo

    Hi!

    i have followed your post and there are very good but…

    i have a problem! i have 3 Exchange server 2013 CU8 but one of them is failing because did not respond by owa neither outlook .

    i have configured all the virtual directories according your instructions but when i move a mailbox to the mailbox database to the new server the owa is blank and the Outlook says “Microsoft Exchange is unavailable Outlook must be online or connect to completed this action”

    how can i test my Exchange? i can not move mailboxes to these server please help me!

    thanks and greats!

    1. Avatar photo

      Sounds like you’ve got some unhealthy or inactive server components on that server. Run “Get-ServerComponentState SERVERNAME” to check.

      Running CU8 also puts you out of support so I recommend you upgrade to CU10.

  4. Shakeer

    Dear Paul,

    I am really interested in your blogs.. ..
    A quick Question.

    How to change the present rpc/http to mapi/http. I have migrated all my Exch Srv to Exch Srv 2013 SP1 CU8. But still when i look at my client it seems to be using RPC/HTTP. So does this happen automatically to MAPI/HTTP or do i need to change it manually from PowerShell.

    And when i check to see if MAPI/HTTP is running . It shows it is running and ACTIVE.

    please help.

  5. Matt Jurcich

    How do you get this command to run in anything except the Exchange Management Shell?

Leave a Reply