I need powershell script to do following:
Objective:
Script should mail conformation to appropriate user about status of the fax job.
In more details:
1. Microsoft Fax service generate certain evens types in Application log, which has details of fax event.
2. Script is triggered on event occurrence and emails status of the fax job defined by event type, to a user who submitted this job. User information is part of Event details.
3. Event details can be retrieved by wevtutil
4. Script should parse text file generated by wevtutil to retrieve following information: jobid, usename
5. Microsoft Fax service generate activity log text file in CSV format, where each string has details about particular fax job
jobid,time,senderfax,recipient,status,user,subject,....
Thus, knowing jobid from Event, script should search ActivityLog.txt file for more details: recipient, subject etc
6.Script shell query Active Directory to get email address associated with username extracted from Event
7. As a result, script combine all information in email body similar to following
To:<username email>
Subject: <defined by Event ID>
Body: Your fax job <subject>, submitted on <date> send to <recipient>has failed with <status>