SFB project experience-67-Exchange 2016 deletes specified subject messages
Problem description:
1) employees send group emails by mistake
2) employees send random group emails
3) BOSS requires you to delete missent group emails or random emails in batches
Solution: (through the web search, combined with the customer environment after the successful test, the simplified method)
1) the delete operation can be realized by using the search-mailbox command to search and then delete.
2) it is clear whether to delete the subject mail of the specified user or of all users in the organization
3) join the administrator
Organization Management
Domain admins
Enterprise admins
Schema admins
Discovery Management;// focus
4) add additional permissions to the administrator, Mailbox Import Export permissions.
New-ManagementRoleAssignment-Role "Mailbox Import Export"-User contoso\ administrator
5) Delete the subject messages of all mailboxes
Get-Mailbox-ResultSize unlimited | Search-Mailbox-SearchQuery 'Subject: "Demo"'-DeleteContent
Reply Y
Delete message
6) Delete the subject mail of the specified user
Search-Mailbox-Identity "ABC"-SearchQuery 'Subject: "Demo"'-DeleteContent
Reply Y
Delete message