PowerShell Script To Get Exchange 2010 Active CAS Connections

Purpose of this script is to report on  particular performance monitor counters for Outlook RPC Client Access, OWA and Exchange ActiveSync on multiple servers.  This was required as during the course of the year there have been a few issues where the third party load balancer device was not really doing equitable load balancing.  In some cases 60% of the user load of 50,000 mailboxes was directed onto a single server. 

Using the script we can easily see the number of Outlook RPC connections, the number of OWA users and how many ActiveSync requests are issued per second.  These are all standard performance monitor counters, the script simply pulls them all into one place. 

Update 20-1-2015:  Added POP3 and IMAP4 connection counters to the script. 

 

Script Overview

The script will build a collection of all the Exchange 2010 CA servers in the organisation.  if you need to restrict the list to a single site the query can be easily modified.  For more PowerShell filtering examples please see this post.  

This is the line that would require editing if you wished to restrict the collection to a single AD site, or subset of servers:

$ExchangeServers = Get-ExchangeServer | Where-Object {$_.AdminDisplayVersion -match "^Version 14" -and $_.ServerRole -Match "ClientAccess" } | Sort-Object Name

 

Running The Script

The script has a handy dandy progress bar to show completion status:

Oooh Shiney - Look A Status Bar

And the finished results should look something like the below, except that your numbers will likely not be zero.  Mine are zero as this is a lab…

PowerShell Script Showing CAS Connections

 

Script Download

Please download the script from the TechNet Gallery:

Download PowerShell Script To Show Exchange 2010 CAS Connections

 

Please also provide feedback here or on the TechNet Gallery site!

Cheers,

Rhoderick

PS Note to self:  Script is clearly lacking as there is no magenta text………..