Friday, September 17, 2010

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.

11 comments:

  1. Thanks for writing this article, it is really helpful and learning article. I am also working in the same field. It seems to be fast and efficient. It is a very good example of testing internally. Keep doing the good work.

    ReplyDelete
  2. Thanks for writing this article, it is really helpful and learning article. I am also working in the same field. It seems to be fast and efficient. It is a very good example of testing internally. Keep doing the good work.
    goldenslot
    GCLUB Casino
    Gclub
    GClub casino

    ReplyDelete
  3. Hi....
    Use the Get-ClientAccessServer cmdlet to view settings that are associated with the Client Access server role. Note: In Exchange 2013 or later, use the Get-ClientAccessService cmdlet instead.
    You are also read more Instant Loan Online

    ReplyDelete
  4. betflix slots are easy to break. Apply for a new member today and get unlimited free credits. Ready to meet a new kind of fun.

    ReplyDelete
  5. Looking for high-quality storyboard free
    resources without breaking the bank? I recently stumbled upon an excellent find at story-board.ai, where they offer an impressive range of storyboard templates and tools for free. It's a game-changer for creators on a budget who still want professional-looking storyboards.

    ReplyDelete