Exchange 2013 deletes messages with a specified subject
Demand: because an employee used the company mailbox to send mass emails, the leader asked to delete the emails with the theme "xxx" in everyone's inbox.
Resolve:
Open Exchange 2013 EMS
Before you do this, you may want to assign
Get-mailbox | Add-MailboxPermission-User administrator-Acce***ights Fullaccess
Delete messages with the subject "xxx" in everyone's inbox
Get-Mailbox-ResultSize unlimited | Search-Mailbox-SearchQuery 'Subject: "XXX"'-DeleteContent
Delete messages with the subject "xxx" in the user's bill-zhao inbox
Get-Mailbox-Identity bill-zhao | Search-Mailbox-SearchQuery 'Subject: "XXX"'-DeleteContent