Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Parse-MailContent.ps1

Fetch email content from monitoring emails generated by ENow Management Suite for further processing

Description

This script fetches emails from a given monitoring mailbox by searching messages for a given subject string. In this case email messages sent by the ENow Manage Suite (http://enowsoftware.com/) The mailbox is queried using Exchange Web Services (EWS). The EWS endpoint is identified by AutoDiscover.

The is a good example for parsing emails using EWS.

The script exports the following columns for further processing:

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

Requirements

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

Do not forget to adjust the EWS library path

Parameters

TargetMailbox

Email address of the monitoring mailbox, Example: monitoring@mcscmemail.de

MailboxFolderPath

Mailbox folder path to search. The string is language specific (EN starts with '\Inbox', DE starts with '\Posteingang'), Example '\Inbox\My Monitoring'

SubjectSearchString

Message subject of monitoring messages to find. Query uses LIKE.

CsvFilename

File name of exported CSV

Examples

.\Get-EmailContent.ps1

Run script using default parameters

Note

THIS CODE IS MADE AVAILABLE AS IS, WITHOUT WARRANTY OF ANY KIND. THE ENTIRE
RISK OF THE USE OR THE RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.

Credits

Written by: Thomas Stensitzki

Stay connected

For more Office 365, Cloud Security, and Exchange Server stuff checkout services provided by Granikos

Releases

No releases published

Packages

No packages published