Remove message from user mailbox

Email sent to individual mailbox:

search-Mailbox -Identity “USER MAILBOX” -SearchQuery Subject:”SUBJECT” -DeleteContent

 

Email sent to distribution list:

Get-DistributionGroupMember “DISTRIBUTIONLISTNAME” | search-Mailbox -SearchQuery Subject:”SUBJECT” -DeleteContent

 

Email sent to a large number of users exported to a text file (one address per line):

Get-Content c:\Temp\FILENAME.txt | search-Mailbox -SearchQuery Subject:”SUBJECT” –DeleteContent

 

Advertisements
This entry was posted in Exchange. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s