rakkad
asked on
Powershell script to check e-mails and report
Hi
Can anyone in assist me in doing the following:-
1. Check the presence of an e-mail e.g. Cognos Start Success Message, if not found within a time period e.g. 4hr, report to a log file as Cognos Start Success Message not found. If found then look for an e-mail 'Cognos Finish Success Message, if not found within a time period e.g. 5hrs report to a log file as Cognos Finish Success Message not found.
Can anyone in assist me in doing the following:-
1. Check the presence of an e-mail e.g. Cognos Start Success Message, if not found within a time period e.g. 4hr, report to a log file as Cognos Start Success Message not found. If found then look for an e-mail 'Cognos Finish Success Message, if not found within a time period e.g. 5hrs report to a log file as Cognos Finish Success Message not found.
ASKER
Thanks for this. I would like explaination of the code please, as I am new to the some of the concepts listed.
Thank-you
Thank-you
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks - much helpful
I have created the following script for you
it can be run like this
Open in new window
The script checks the subject to see if it contains message 1 wait 1 hr and check for 3 hrs is message2 arrives . creating a log file myLogFile.txt
Open in new window