Count of emails sent by a particular id to my employee

Jonathan Priyaraj 160 Reputation points
2024-03-21T16:20:14.38+00:00

I want to get count of all emails sent from a particular email addresses to my employee in last two months. For eg : number of emails ******@gmail.com has sent to ******@contoso.com in last 2 months. Please send me powershell query compatible with exchange 2016 version.

Exchange | Exchange Server | Other
Exchange | Exchange Server | Management
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Dennis Goedegebuure 11 Reputation points MVP
    2024-03-21T20:51:54.95+00:00

    I would suggest to use the Get-MessageTrackingLog cmdlet of PowerShell. They also have an example in the documentation for that cmdlet:

    https://learn.microsoft.com/en-us/powershell/module/exchange/get-messagetrackinglog?view=exchange-ps#example-1

    Try something like below

    $messages = Get-MessageTrackingLog -Server Mailbox01 -Start "01/21/2024 09:00:00" -End "03/21/2024 17:00:00" -Sender "******@gmail.com"
    $messages.Count
    
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.