Friday, November 9, 2018

Search and Delete specific message from all mailboxes Exchange 2016

Open the Exchange Management Shell

Run the following commands.

New-ComplianceSearch -Name "Remove Message" -ExchangeLocation all -ContentMatchQuery 'subject:"Check This Order"'


Start-ComplianceSearch -Identity "Remove Message"
 
 
1) (Received:4/13/2016..4/14/2016) AND (Subject:'Action required')
 
2) (From:chatsuwloginsset12345@outlook.com) AND (Subject:"Check This Order")
 
 
 
Delete
 
New-ComplianceSearchAction -SearchName "Remove Message" -Purge -PurgeType SoftDelete 
 
 
Source 
 
 
 
 
   
 
 


No comments:

Post a Comment

 
span.fullpost {display:inline;}