Exchange Server 2013Exchange Server 2016Description

This script fetches emails from a given monitoring mailbox by searching email messages for a given subject string. In this case, email messages sent by the ENow Management Suite (http://enowsoftware.com/). Status messages are parsed to extract Disk Performance alert data for further processing in Power BI.

The mailbox is queried using Exchange Web Services (EWS). AutoDiscover identifies the EWS endpoint.

The script exports the following columns for further processing:

  • SERVER = Name of Exchange server reporting issue
  • DATE = Date of issue occurrence (Short Date)
  • TIME = Time of issue occurrence (Long Time)
  • IO = READ or WRITE
  • THRESHOLD = WARNING or CRITICAL
  • VALUE = reported value

You can easily adjust the script to fit your requirements. Search for other message subjects and parse for other content in the message body.

Requirements

  • Windows Server 2012 R2+ 
  • Exchange Server 2013+
  • Exchange Web Services Library

Examples

Code Samples

# Run script using default parameters
.\Get-EmailContent.ps1

Example output

"COMPUTER";"DATE";"TIME";"IO";"THRESHOLD";"VALUE"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Critical";"109,90"
"EXLABP08";"19.05.2017";"11:15:38";"WRITE";"Warning";"23,61"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Critical";"80,13"
"EXLABP08";"19.05.2017";"11:15:38";"WRITE";"Warning";"21,58"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Warning";"33,01"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Critical";"53,04"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Warning";"24,24"
"EXLABP08";"19.05.2017";"11:15:38";"READ";"Warning";"40,01"

Power BI report examples

Power BI report based on CSV output

This example shows that P04 and P08 have exceeded the critical and warning state disk performance thresholds more often than the other servers.

The next example shows the same date in a different report.

Power BI report based on CSV output

Version History

  • 1.0, Initial community release

Links

Follow

Entdecke mehr von Granikos GmbH & Co. KG

Jetzt abonnieren, um weiterzulesen und auf das gesamte Archiv zuzugreifen.

Weiterlesen