search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
How to get active connections of Exchange CAS Server with PowerShell?
Posted in Windows Powershell | 1 Comment | 17,583 views | 22/05/2013 15:30

In this sample, I’ll show you how to get active Exchange Server CAS connections via PowerShell:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$ExchangeHost = "ExCas01"
$ExchangeServer = Get-ExchangeServer -Identity $ExchangeHost
 
# Get Connections
if ($ExchangeServer.IsClientAccessServer -eq $True)
{
	# OWA Connections
	$HostOWAConnections = (Get-Counter "\MSExchange OWA\Current Unique Users"  -ComputerName $ExchangeHost).CounterSamples[0].CookedValue
 
	# RPC Connections
	$HostRPCConnections = (Get-Counter "\MSExchange RpcClientAccess\User Count"  -ComputerName $ExchangeHost).CounterSamples[0].CookedValue
 
	# POP3 Connections
	$HostPOP3Connections = (Get-Counter "\MSExchangePop3(1)\Connections Current"  -ComputerName $ExchangeHost).CounterSamples[0].CookedValue
 
	# IMAP Connections
	$HostIMAPConnections = (Get-Counter "\MSExchangeImap4(1)\Current Connections"  -ComputerName $ExchangeHost).CounterSamples[0].CookedValue
 
	# Exchange Connections
	[int]$ExchangeActiveConnections = [int]$HostOWAConnections + [int]$HostRPCConnections + [int]$HostPOP3Connections + [int]$HostIMAPConnections
}

You can loop this script to get real time connection statistics.


Comments (1)

Colegiala sexy

January 13th, 2020
21:40:00

I know this web site provides quality dependent posts and extra stuff, is there any other web site which provides these data in quality?



Leave a Reply