Tuesday, February 24, 2015

How to search and delete a mail from all mailbox

How to search and delete a mail from all mailbox

Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'Subject:"Re-Please Update Your Password‏"' -DeleteContent


Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'SafetyDataList' -TargetMailbox "guptaa10" -TargetFolder "Inbox" -LogLevel Full

Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'Subject:"*Account Alert: Card Not Present Transaction*"' -DeleteContent | Where-Object {$_.ResultItemsCount}






No comments:

Post a Comment