Retrieves multiple kinds of KPI of Exchange servers using Get-Counter.
#must be run in the context of an administrative account of Exchange servers as it pulls the data from performance counters
#get HTTPProxy latency and send report to multiple recipients
.\Get-ActiveExchangeUser.ps1 -HTTPProxyAVGLatency -SendMail -From admin@contoso.com -Recipients rob@contoso.com,peter@contoso.com -SmtpServer smtp.contoso.local
#get IIS memory usage for application pools using CIM
.\Get-ActiveExchangeUser.ps1 -IISMemoryUsage -UseCIM
#get current requests for application pools, which is more reliable than using Exchange performance counters
.\Get-ActiveExchangeUser.ps1 -UseASPDOTNET
here you can define in which ADSite is searched for Exchange server. If omitted current AD site will be used.
if used the script will sum up the active user count across all servers per protocol
switch to use IIS performance counters (ASP.NET Apps v4.0.30319\Requests Executing) for gathering current requests per protocol
the script will collect for each protocol the performance counter "\MSExchange HttpProxy(protocoll)\Average ClientAccess Server Processing Latency"
the script will collect for each protocol the performance counter "\MSExchange HttpProxy(protocoll)\Outstanding Proxy Requests"
the script will collect for each protocol the performance counter "\MSExchange HttpProxy(protocoll)\Proxy Requests/Sec"
the script will collect for main protocols counters like "\MSExchangeIS Client Type(*)\RPC Average Latency",\MSExchange RpcClientAccess\RPC Averaged Latency","\MSExchange MapiHttp Emsmdb\Averaged Latency"
collects and compute the average of the following GC performance counters ".NET CLR Memory(w3w*)% Time in GC",".NET CLR Memory(w3*)\Process ID","\W3SVC_W3WP(*)\Active Requests"
filtering for specific servers, which were found in given AD site
as the script uses the CmdLet Get-Counter you can define the number of MaxSamples. Default is 1
switch to send an e-mail with a CSV attached
define the sender address
define the recipients
which SmtpServer to use
collects the following performance counters "\Process(w3wp*)\working set - private". Note: This will return only the workes with no hint, which worker process it is. Use UseCIM switch for details.
Uses CIM for gathering IIS memory usage for application pools, which returns friendly name of application pools.
Timeout for CIM connection. Default is 30 seconds.
For more information on this script, as well as usage and examples, see the related blog article on The Clueless Guy.
This project is licensed under the MIT License - see the LICENSE.md for details.