Deleting message from users' mailboxes
Hello
We recently had a mass Spam attack that sent an offensive email to a large group of users (on a DL).
The subject was "Virus". I want to remove that from everyone's mailboxes.
I've read I can use this:
Export-Mailbox -SubjectKeywords "Virus message" -DeleteContent
Does anyone know if this will 'hard delete' the message or move it to the Deleted Items?
Secondly, is there a way I can get a report on the outcome (e.g. which message/how many messages matching that filter it deleted)?
August 21st, 2011 2:18am
Which version of Exchange are you on?MCTS: Messaging | MCSE: S+M
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2011 3:24am
Sorry, should have said - Exchange 2007 Sp3
August 21st, 2011 9:27pm
Hi,
Making an example for you:
The example shows how to find and delete items from a mailbox. This example first gets all the mailboxes on database DB1 and searches for items that contain the string "Virus message" in the
subject. It will export the items to another mailbox and will delete those items from the source mailbox.
Get-Mailbox -Database DB1 | Export-Mailbox -TargetMailbox ExportMailbox -TargetFolder VirusData -SubjectKeywords "Virus message" –DeleteContent
Best Regards!
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2011 4:59am
Hi
Thanks for the info...why not just delete them from the source mailbox though, why do you export them first? Could we not do:
Get-Mailbox -Database DB1 | Export-Mailbox -SubjectKeywords "Virus message" –DeleteContent
Also, we are thinking of moving some users to Exchange 2010 new servers. Can we still use this command on 2010 mailboxes if it's run from a 2007 server?
August 22nd, 2011 11:36pm
Hi,
If you use any keyword parameters, Export-Mailbox will first export all of the messages, including messages in the dumpster, and then search the target mailbox for
messages that meet the keyword criteria. Messages that were in the dumpster on the source mailbox are converted to regular messages on the target mailbox and will also be searched for keywords. Export-Mailbox then deletes messages on the target mailbox that
do not match the keyword criteria. If you also use the DeleteContent parameter, Export-Mailbox will then delete the messages that match the keyword criteria from the source mailbox.
Also, you cann't use command on 2010 mailboxes if it's run from a 2007 server.Best Regards!
Free Windows Admin Tool Kit Click here and download it now
August 23rd, 2011 10:33am
Does anyone know the answer to these questions:
>>
Thanks for the info...why not just delete them from the source mailbox though, why do you export them first? Could we not do:
Get-Mailbox -Database DB1 | Export-Mailbox -SubjectKeywords "Virus message" –DeleteContent
Also, we are thinking of moving some users to Exchange 2010 new servers. Can we still use this command on 2010 mailboxes if it's run from a 2007 server?
August 25th, 2011 3:00pm
Does anyone know the answer to these questions:
>>
Thanks for the info...why not just delete them from the source mailbox though, why do you export them first? Could we not do:
Get-Mailbox -Database DB1 | Export-Mailbox -SubjectKeywords "Virus message" –DeleteContent
Also, we are thinking of moving some users to Exchange 2010 new servers. Can we still use this command on 2010 mailboxes if it's run from a 2007 server?
You dont need to export, you can delete straight away using -DeleteContent " If you use the DeleteContent parameter and do not specify the TargetMailbox parameter, you can delete content from the source mailbox without exporting it to another mailbox.
If you move the users onto exch 2010, then you have to use exch 2010 cmdlet not the 2007 cmdlet, which is search-mailbox. -
http://technet.microsoft.com/en-us/library/dd298173.aspx
Sukh
Free Windows Admin Tool Kit Click here and download it now
August 25th, 2011 3:26pm