Monday, October 26, 2015

How Busy Are Your CAS Servers

Hi folks,

I'd love to share with you a script on how to retrieve how busy are your CAS servers with the client connections for different client access protocol.

All you need to do is to connect to each client access server and retrieve information from the appropriate performance counters related to client access servers. Below is the sample script which includes every CAS protocol except for ActiveSync, as I was not able to find the appropriate counter.

For the remaining protocols you will need the following code to retrieve number of users.

Get-ClientAccessServer |foreach {Get-Counter "Web Service(_Total)\Current Connections" -ComputerName $_.Name}
Get-ClientAccessServer |foreach {Get-Counter "MSExchange OWA\Current Unique Users" -ComputerName $_.Name}
Get-ClientAccessServer |foreach {Get-Counter "RPC/HTTP Proxy\Current Number of Unique Users" -ComputerName $_.Name}
Get-ClientAccessServer |foreach {Get-Counter "MSExchange RpcClientAccess\User Count" -ComputerName $_.Name}
Get-ClientAccessServer |foreach {Get-Counter "\MSExchangeImap4(_total)\Current Connections" -ComputerName $_.Name}
Get-ClientAccessServer |foreach {Get-Counter "\MSExchangePOP3(_total)\Connections Current" -ComputerName $_.Name}

As an option you can add Export-Csv or Out-File cmdlets to output the data to text files.

Enjoy!