Avatar of colmisdiv
colmisdiv
 asked on

Mass delete email

We are looking for a way to mass remove an email, sent in error, whether it is read or not. We are not looking for a recall.
We are running exchange 2010 sp3 rollup 7 on server 2008R2
ExchangeWindows Server 2008Email Servers

Avatar of undefined
Last Comment
becraig

8/22/2022 - Mon
becraig

#give yourself the required permissions first
Get-Mailbox -ResultSize unlimited | Add-MailboxPermission -User MyAdmin -AccessRights FullAccess -InheritanceType all


#Then do the delete
#  -TargetMailbox MyBackupMailbox -TargetFolder DeleteMsgs   These fields are expecting that you have a mailbox and folder where you move the mail before deleting you can remove these
Get-Mailbox  -ResultSize Unlimited | Export-Mailbox -SubjectKeywords "Your email subject" -IncludeFolders "\Inbox" -StartDate "11/24/2014" -EndDate "11/25/2014" -DeleteContent -TargetMailbox MyBackupMailbox -TargetFolder DeleteMsgs -Confirm:$false

Open in new window



More info on message deletion:
http://blogs.technet.com/b/exchange/archive/2010/10/27/3411398.aspx
ASKER CERTIFIED SOLUTION
becraig

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23