PowerShell Command for Email Tracking Logs

Gurudas 951 Reputation points
2024-10-09T14:20:22.55+00:00

What PowerShell command can be used to validate the last sent and last received email for 10 mailboxes? Quick assistance would be greatly appreciated!

Exchange Online
Exchange Online
A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-10-10T07:21:45.5633333+00:00

    Hi, @Gurudas

    From your description, do you want to see the specifics of the last sent and last received emails from multiple mailboxes, or do you want to see when messages were received and sent?

    Are you using Exchange Online or Exchange Server environment?

    Please understand that the Exchange Online tag currently only provides commands for a single mailbox. If you want to see the timestamp of a message, you can try running the Get-MailboxFolderStatistics command with the -IncludeOldestAndNewestItems switch. This will give you the date when the latest emails arrived in your inbox (and subfolders) and sent items folders.

    If you want to implement a query on multiple mailboxes, you can use the above commands as many times as you like or develop related scripts.

    In addition, I'll add the Power Shell tag for you.

    More information can be found Finding the last time stamp of a sent and/or received email with PowerShell? : r/Office365 (reddit.com)


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


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.