Share via

Check to see the date of the last email sent or received to a distribution mailbox?

Linus 1 Reputation point
2021-08-24T10:16:58.43+00:00

Hello,

I’m trying to find when was the last email sent or received to a distribution mailbox in exchange server 2016.

Active directory is populated with an unholy amount of mailboxes and distribution mailboxes. Is there a way to check if any of these are inactive/not used?

For example, if an email hasn’t been sent or received to/from that mailbox in the last 90 days, what would be the quickest way to find out this data?

Right now I have the below:

Search-Mailbox -SearchQuery {from:emailadressname@keyman .com AND Received:"05/24/2021 10:00..08/24/2021 13:00"}

I’m open to hearing other ways of getting this data if there is any better solutions

Thank you in advance

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

Exchange | Exchange Server | Management
Exchange | Exchange Server | Management

The administration and maintenance of Microsoft Exchange Server to ensure secure, reliable, and efficient email and collaboration services across an organization.

Windows for business | Windows Server | User experience | PowerShell

3 answers

Sort by: Most helpful
  1. KyleXu-MSFT 26,406 Reputation points
    2021-08-25T08:03:15.45+00:00

    @Linus

    You can also use Get-MessageTrackingLog command to check the latest email that sent to group and received from group:

    The latest email that sent to group:

    Get-TransportService | Get-MessageTrackingLog -Recipients ******@domain.com -EventId RECEIVE -Source SMTP | Sort-Object Timestamp -Descending | select Timestamp,Sender,MessageSubject -First 1  
    

    The latest email that receive from group:

    Get-TransportService | Get-MessageTrackingLog -Sender ******@domain.com -EventId send -Source SMTP | Sort-Object Timestamp -Descending | select Timestamp,Sender,MessageSubject -First 1  
    

    Please note that the Message Tracking log can only record logs within 30 days:

    Get-TransportService | fl MessageTrackingLogMaxAge  
    

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    2 people found this answer helpful.

  2. Limitless Technology 40,101 Reputation points
    2021-08-25T08:57:12.203+00:00

    Hello,

    Thank you for your question..

    I would like to suggest you to check Message Trace from Exchange admin Center.
    you need provide Distribution group email address to check if the emails are delivered or not.

    Alternatively please have a look on below Microsoft article related to Message tracking and tracing.

    https://learn.microsoft.com/en-us/exchange/mail-flow/transport-logs/message-tracking?view=exchserver-2019

    https://learn.microsoft.com/en-us/answers/questions/131210/message-tracking-log-for-distribution-group-emails.html

    If the reply was helpful, please don’t forget to upvote or accept as answer.

    Thanks,

    PRAKASH T

    Was this answer helpful?

    0 comments No comments

  3. Rich Matheisen 48,116 Reputation points
    2021-08-24T15:13:58.26+00:00

    I'm not sure if this will do it for you, but give it a try: Get-MailboxFolderStatistics

    Was this answer helpful?

    0 comments No comments

Your answer

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