Search-MailboxAuditLog

Rising Flight 5,216 Reputation points
2025-05-25T10:43:34.38+00:00

One of my user is unable to find any emails in their Sent Items folder. I want to check the audit logs for sent items. I tried the following syntax but i am unable to figure it out. could you please guide me with the correct syntax?

$date=((get-date).AddDays(-90)).ToShortDateString()
$Today=(get-date).ToShortDateString()
Search-MailboxAuditLog ******@contoso.com -LogonTypes Admin,Owner,Delegate -ShowDetails -StartDate $date -EndDate $Today | Export-CSV C:\temp\logs.csv –NoTypeInformation -Encoding UTF8

Exchange Online
Exchange Online
A Microsoft email and calendaring hosted service.
6,182 questions
0 comments No comments
{count} votes

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.