Get Active Exchange 2010 CAS Connections PowerShell Script

Purpose of this script is to report on  particular performance monitor counters for Outlook RPC Client Access, OWA and Exchange ActiveSync on multiple servers.

 
 
 
 
 
5 Star
(7)
11,847 times
Add to favorites
Exchange
2/21/2019
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Can I have more details?
    1 Posts | Last post January 11, 2019
    • Hi,
      I want to shutdown soon our Exchange 2010 server after a migration to EOnline.
      Normaly, no more users should be connected to our onpremise Exchange server, but with your script, I see many connections.  Is this a way to export the username or the email of thoses actives connections?
      I suppose some users does not received all the info for the new configuration.
      Thanks a lot.
      Martin
  • Any plans to make this support 2013/2016, or have you found a replacement?
    1 Posts | Last post May 16, 2018
    • Any plans to make this support 2013/2016, or have you found a replacement?
      
      :)
  • Version with German Counters
    2 Posts | Last post August 07, 2017
    • Hi
      
      I changed the Counters to German, where can i Upload it for the Public?
    • https://gallery.technet.microsoft.com/office/Get-Active-Exchange-2010-09d5011f
  • how about exchange 2013
    1 Posts | Last post November 12, 2015
    • Hi, 
      Does it support for exchange 2013 ?
  • errors on running
    3 Posts | Last post August 11, 2015
    • FYI
      myself and other users are reporting errors are being returned (abeit with some results)
      
      http://blogs.technet.com/b/rmilne/archive/2014/12/17/powershell-script-to-get-active-cas-connections.aspx
      
      
      I`m getting some results back but its also littered with errors for each CAS. 
      
      Get-Counter : The \\CAS01\\MSExchangePOP3(_total)\Connections Current performance counter path is not valid.
      At H:\Powershell\Exchange 2010\CAS Users\Get-Active-Cas-Connections-v3.ps1:107 char:56
      + $WorkingObject.POP = [math]::Truncate((Get-Counter <<<< "\MSExchangePOP3(_total)\Connections Current" -Compute
      rName $Server.Name).CounterSamples[0].Cookedvalue)
      + CategoryInfo : InvalidResult: (:) [Get-Counter], Exception
      + FullyQualifiedErrorId : CounterPathIsInvalid,Microsoft.PowerShell.Commands.GetCounterCommand
      
      Cannot index into a null array.
      At H:\Powershell\Exchange 2010\CAS Users\Get-Active-Cas-Connections-v3.ps1:107 char:147
      + $WorkingObject.POP = [math]::Truncate((Get-Counter "\MSExchangePOP3(_total)\Connections Current" -ComputerName
      $Server.Name).CounterSamples[ <<<< 0].Cookedvalue)
      + CategoryInfo : InvalidOperation: (0:Int32) [], RuntimeException
      + FullyQualifiedErrorId : NullArray
      
      
    • Hi folks,
      
      is it only the POP3 & IMAP4 counters that are causing this?
      
      What do you see when looking at the counter directly in perfmon?
      
      Cheers,
      Rhoderick 
    • I updated to include some logic for when POP and IMAP is not enabled.  
      
      That should get rid of the errors.
      
      Cheers,
      Rhoderick 
  • SenAMil
    1 Posts | Last post January 21, 2015
    • Sorry I'M beginner in powershell but I have messae when I put the send-mail
      
      Send-MailMessage : Cannot convert 'System.Object[]' to the type 'System.String' required by parameter 'Body'. Specified method is not supported.
      At C:\Users\DFJ6584\Desktop\PowerShell\Get-Active-Cas-Connections-v2.ps1:106 char:167
      + Send-MailMessage -from patrick.f.langevin@desjardins.com -to patrick.f.langevin@desjardins.com -Subject "Get Counter" -SmtpServer "cwprimx57.mvt.desjardins.cer" -Body <<<<  $Out
      put -BodyAsHtml -Encoding ([System.Text.Encoding]::UTF8)
          + CategoryInfo          : InvalidArgument: (:) [Send-MailMessage], ParameterBindingException
          + FullyQualifiedErrorId : CannotConvertArgument,Microsoft.PowerShell.Commands.SendMailMessage
      
  • Report
    2 Posts | Last post January 21, 2015
    • If this script can send mail with the number of connection ?
    • It could, I just did not add this in.  
      
      Could add that when I do V4.  
      
      In the meantime look at adding Send-MailMessage 
      
      Cheers,
      Rhoderick