Exchange 2013 Powershell Script: Check CAS Health v2

Back when we were first putting in Exchange 2013 I wanted a way to check the Client Access Server roles as we were deploying servers to make sure that they were coming up okay.  Thankfully, the Exchange 2013 team was smart enough to put in some healthcheck urls, primarily to help out the SCOM side of things.  Essentially, if the apppool and service are running right (massive “in theory” here), it will only return a 200 OK value.  Otherwise, it drops you a nice error.

I ended up writing a script to go out and take a server name and fetch these.  Then I wrote another script that would call that script and had all of our server names hardcoded in it.

Yep, I was lazy.

So now I’ve gone through the process of rewriting it to give me, and you, more options, and to be a better solution for everyone involved.  Plus it means I can be even lazier now!

I present to you, Check-CASHealthv2.ps1.  It’s fairly long, so I’ve placed it on TechNet.

In this screenshot, you can see how to specify a single server as well as the members of a particular DAG.

CHECK-CASHealthv2_00

This one shows the results of an entire Exchange organization, as well as some failures

CHECK-CASHealthv2_01

This is one of those tools that I check when I get the generic “OWA is broken” call from someone so that I can figure out the scope of any issues.

Best of all, you can pipeline the output and sort/format/etc. to your hearts content!

CHECK-CASHealthv2_02

Advertisements
This entry was posted in Exchange 2013, Monitoring, Powershell and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s