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}
Get-Mailbox -ResultSize Unlimited | Search-Mailbox -SearchQuery 'Subject:"*Account Alert: Card Not Present Transaction*"' -DeleteContent | Where-Object {$_.ResultItemsCount}
https://technet.microsoft.com/en-us/library/ff522360(v=exchg.150).aspx
http://mikefrobbins.com/2013/12/19/using-powershell-to-remove-phishing-emails-from-user-mailboxes-on-an-exchange-server/
http://mikefrobbins.com/2013/12/19/using-powershell-to-remove-phishing-emails-from-user-mailboxes-on-an-exchange-server/
No comments:
Post a Comment