locked
Delete from all mailboxes RRS feed

  • Question

  • I amtrying to delete a certain message from all user mailboxes.  I followed the instruction at http://blogs.technet.com/b/exchange/archive/2010/10/27/removing-specific-messages-from-your-exchange-server.aspx and it does not seem to work.  I set up a test message so I could confirm each mailbox it is checking and it does step through the mailboxes The Powershell  used was Get-Mailbox -Server Server1 -ResultSize Unlimited | Export-Mailbox -SubjectKeywords "aa bb cc dd" -IncludeFolders "\Inbox" -DeleteContent It does ask to confirm that I want to scan each mailbox one by one but does not delete the message when I answer Y  The accounbt I amtesting against is the first account so I don't have to finishe scanning the mailboxes.  I can suspend after that mailbox gets checked.. I did sub in our server name for the -server entry. Any ideas
    gwilken
    Wednesday, July 6, 2011 9:47 PM

Answers

  • I figured it out.  You can't suspend the process.  It has to go through all the mailboxes before it actually does the deletes.  Because I was suspending the process after my test mailbox was "checked" the process actually never ran.
    gwilken
    Thursday, July 7, 2011 12:28 PM
  • Hi,

    Yes, , Export-Mailbox will first export all of the messages and then deletes messages on the target mailbox that do not match the keyword criteria.

     Finally, if you also use the DeleteContent parameter, Export-Mailbox will then delete the messages that match the keyword criteria from the source mailbox.

    http://technet.microsoft.com/en-us/library/aa998579(EXCHG.80).aspx


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, July 11, 2011 7:00 AM

All replies

  • Hi

    Export-Mailbox content to where is missing in your shell command.

    Can you run this command and inform the status

    get-mailbox -Servet "Server Name" -ResultSize Unlimited| Export-Mailbox –ContentKeywords "Test message" –TargetMailbox Administrator –TargetFolder 'My Inbox' –DeleteContent

    kindly inform me the status.

    Thursday, July 7, 2011 7:13 AM
  • I figured it out.  You can't suspend the process.  It has to go through all the mailboxes before it actually does the deletes.  Because I was suspending the process after my test mailbox was "checked" the process actually never ran.
    gwilken
    Thursday, July 7, 2011 12:28 PM
  • Hi,

    Yes, , Export-Mailbox will first export all of the messages and then deletes messages on the target mailbox that do not match the keyword criteria.

     Finally, if you also use the DeleteContent parameter, Export-Mailbox will then delete the messages that match the keyword criteria from the source mailbox.

    http://technet.microsoft.com/en-us/library/aa998579(EXCHG.80).aspx


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, July 11, 2011 7:00 AM