How to Determine active mailboxes connected on Exchange Server 2010 Client Access

Here a very good script from Mike Pfeiffer quick way to check how many users connected to client access server using exchange 2010 monitor counters

We need to know how many users will get effected if we have a downtime, With the help of performance counters we can identify the no of users currently active in CAS servers RPC or OWA.

You can also go through a complete list of counters for exchange 2010 CAS and Mailbox

function Get-CASActiveUsers {
[Parameter(Position=0, ParameterSetName=”Value”, Mandatory=$true)]
[Parameter(Position=0, ParameterSetName=”Pipeline”, ValueFromPipelineByPropertyName=$true, Mandatory=$true)]

process {
switch($PsCmdlet.ParameterSetName) {
“Value” {$servers = $ComputerName}
“Pipeline” {$servers = $Name}
$servers | %{
$RPC = Get-Counter “\MSExchange RpcClientAccess\User Count” -ComputerName $_
$OWA = Get-Counter “\MSExchange OWA\Current Unique Users” -ComputerName $_
New-Object PSObject -Property @{
Server = $_
“RPC Client Access” = $RPC.CounterSamples[0].CookedValue
“Outlook Web App” = $OWA.CounterSamples[0].CookedValue

Copy it in the NotePad and save with PS1 format

Open the Exchange Management Shell

Here I have used dot sourced before the script and also there is space between dot and then location of your script otherwise it won’t work.



Exchange 2013 SP1 Edge Role

Exchange 2013 has bought back the Edge Transport Role in Service Pack 1 by handling all internet facing mails which can provide STMP Relays and Smart host services.

Configurations for Edge role remains the same as you need to add ADLDS.