Fetch email content from monitoring emails generated by ENow Management Suite for further processing
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
- Windows Server 2012 R2+
- Exchange Server 2013+
- Exchange Web Services Library
Do not forget to adjust the EWS library path
Email address of the monitoring mailbox, Example: monitoring@mcscmemail.de
Mailbox folder path to search. The string is language specific (EN starts with '\Inbox', DE starts with '\Posteingang'), Example '\Inbox\My Monitoring'
Message subject of monitoring messages to find. Query uses LIKE.
File name of exported CSV
.\Get-EmailContent.ps1
Run script using default parameters
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.
Written by: Thomas Stensitzki
- My Blog: http://justcantgetenough.granikos.eu
- Twitter: https://twitter.com/stensitzki
- LinkedIn: http://de.linkedin.com/in/thomasstensitzki
- Github: https://github.com/Apoc70
- MVP Blog: https://blogs.msmvps.com/thomastechtalk/
- Tech Talk YouTube Channel (DE): http://techtalk.granikos.eu
For more Office 365, Cloud Security, and Exchange Server stuff checkout services provided by Granikos
- Blog: http://blog.granikos.eu
- Website: https://www.granikos.eu/en/
- Twitter: https://twitter.com/granikos_de