Purpose of this script:

Some business requires to track the READ status of the some critical messages. They want to know if the email was delivered to the Mailbox and was read by the user. You shall use the message tracking log to find the delivery status of the email and Use this script to find the READ status of the email.

Description:

Get-ReadStatus is the function exported by the script. The script can be used against On-perm or Online mailboxes to find the Read / Unread status of an email message. The function returns a Custom Object with the READ status of the email. It first searches for the email message in the Inbox of the target mailbox with Search filters and if not found, it searches the Entire Mailbox using Search folders.

After reading the message, user may mark the message as 'UnRead' to review it later. This script retrieves the 'EverRead' status, an extended MAPI property value to report the Read Status of the message.

Features:

Prerequisite   : Requires Powershell V3 or Higher.

                       : Requires EWS API 1.2 or higher installed on the machine.

Example to use it on a script:

 

 

PowerShell
Edit|Remove
        Import-Module D:\Scripts\GetReadStatus.ps1 
        $credentials = Get-Credential 
        $messageID = ‘EAE70D3DF2CF50408C09D26480FE85A3D2DF4D53@myserver.com’ 
        $URL = ‘https://outlook.office365.com/EWS/Exchange.asmx’ 
 
 
        #$EmailAddress = Get-Content C:\temp\EmailAddress.txt 
    $EmailAddress = Get-MessageTrace -MessageId $MessageID -Status Delivered | select -ExpandProperty RecipientAddress 
        $Result = @() 
        [INT]$Total = $EmailAddress.Count 
        [INT]$i = 0 
     
        ForEach($Address in $EmailAddress) { 
            $i++ 
            Write-Progress -Activity "Processing $Address " -Status " $i / $Total " 
               $MailboxName = $Address 
               $Result += Get-ReadStatus –Emailaddress $MailboxName -Credential $credentials -Impersonate -EWSUrl $URL -MessageID $MessageID -startdate 03/03/2017 -enddate 03/20/2017 
        } 
 
 
        $Result | Export-Csv C:\Temp\Readstatus.csv -NoTypeInformation

 Please let me know if you find it useful.

Thank you