Troubleshooting the Client Access Server

Many of us are familiar with troubleshooting the CAS services from outside our network using the Exchange Remote Connectivity Analyzer, but what about testing internally?  Or testing specific virtual directories such as the ECP?  There are some great built-in Powershell cmdlets that make troubleshooting the CAS much easier.

I would like to go through these one by one and show examples of each.  More information can be seen by clicking each cmdlet below.

Before we get started, many of these cmdlets rely on utilizing a test mailbox.  This mailbox is not created by default.  If you try to run a cmdlet that requires the test mailbox, you will see the following error: MailboxNotFoundException

CAS-user_error

A script is available to help generate the test mailbox for you.  From the Scripts folder where Exchange is installed, in my case C:\Program Files\Microsoft\Exchange Server\V14\Scripts\, run the New-TestCasConnectivityUser.ps1 script.

CAS-test user

Now that the test mailbox is created, let’s look at the different cmdlets.

Test-ServiceHealth – This should be run first in any troubleshooting scenario.  This script will list each Exchange role, what services are required for that role to function properly and which of those services are not running.

CAS-test-Services-before-mark2

In my example, you will see that the Exchange Forms Based Authentication service is not started.  After starting this from the services console, I run the cmdlet again and everything looks normal.

CAS-test-Services-after

Test-MapiConnectivity – This is the next command that should be run to verify that mailbox access is working.  Note that a | format-list can be added to any command to get more detailed information.

CAS-test-mapiconn

Test-OutlookConnectivity – Will verify that OWA is running and can be used to test all virtual directories or individual ones.  In this example I am testing HTTP connectivity, TCP can also be specified.

CAS-test-outlookconn-http

Test-OutlookWebServices – Verifies the service information returned by Autodiscover for the Availability Service, Outlook Anywhere, OAB, and UM

CAS-test-outlookwebserv-con

Test-WebServicesConnectivity – Tests EWS functionality.

CAS-test-webservices

Test-EcpConnectivity – Verifies connectivity to the Exchange Control Panel.

CAS-test-ecp

Test-ActiveSyncConnectivity – Performs a full mailbox synchronization to verify health of ActiveSync

CAS-test-AS

Test-PowerShellConnectivity – Test whether PowerShell remoting on a target CAS server is healthy

CAS-test-powershell

Also available are the Test-ImapConnectivity and Test-PopConnectivity if you are supporting those protocols.  Always remember to use the Best Practices Analyzer report from the Toolbox as well.

Tags:

Leave a Reply

x

We use cookies to ensure the best possible experience on our website. Detailed information on the use of cookies on this site is provided in our Privacy and Cookie Policy. Further instruction on how to disable our cookies can be found there.