Last active
December 1, 2016 06:30
-
-
Save WildDogOne/22b7688464518829df84 to your computer and use it in GitHub Desktop.
Exchange Tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Delete all mails in every mailbox with the Subject "Summer Offer" | |
Get-MailBox | Search-Mailbox -SearchQuery "Summer Offer" -DeleteContent | |
#Alternative | |
Get-Mailbox -Server "*Server*" | Search-Mailbox -SearchQuery 'Subject:"*Subject*" and Body:"*Body*"' -DeleteContent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment