PowerShell Script To Check Exchange CAS Connection Details with Email report

 The script would check All Exchange CAS Server in the organization for number of Client connections (OWA,ActiveSync,RPC(outlook),EWS)  and send details as HTML formatted email report. The report is very useful when you want to check the load on the CAS server.

3.8 Star
2,419 times
Add to favorites
E-mail Twitter del.icio.us Digg Facebook
  • ReportFormat
    2 Posts | Last post February 24, 2017
    • Kumaraj,
      I really like the script. Can you tell me the reason why the "Server' column is in the middle of the table? I see you have it on first column.
    • could be the reason of different powershell version. check with PS version 3 and higher
  • Runing with Error message
    4 Posts | Last post April 18, 2016
    • I Have changed the Value of what need to be changed (see Below)
      [string] $smtpServer = "Exch10CAS02.sunlin.com"
      [string] $fromAddress="Report@sunlin.com"
      [string[]] $toAddress="linsun@sunlin.com"
      But it still show me error message with 
      The term 'Get-ClientAccessServer' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that th
      e path is correct and try again.
      At C:\Users\administrator.SUNLIN\Desktop\PowerShell_Script_CAS_Connections.ps1:99 char:40
      + [string[]]$CAS = Get-ClientAccessServer <<<<  | sort name
          + CategoryInfo          : ObjectNotFound: (Get-ClientAccessServer:String) [], CommandNotFoundException
          + FullyQualifiedErrorId : CommandNotFoundException
      Get-Counter : Cannot validate argument on parameter 'ComputerName'. The argument is null. Supply a non-null argument and try the command again.
      At C:\Users\administrator.SUNLIN\Desktop\PowerShell_Script_CAS_Connections.ps1:82 char:80
      +       $RPC = Get-Counter "\MSExchange RpcClientAccess\User Count" -ComputerName <<<<  $_
          + CategoryInfo          : InvalidData: (:) [Get-Counter], ParameterBindingValidationException
          + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.GetCounterCommand
    • Please make sure you are running the script from exchange management shell.
    • Yes,Kamaraj Ulaganathan
      it works 
      thanks !~!
    • Thanks alot , It is working