Delete from all mailboxes
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 ideasgwilken
July 6th, 2011 5:56pm

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.
Free Windows Admin Tool Kit Click here and download it now
July 7th, 2011 3:21am

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
July 7th, 2011 8:30am

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).aspxPlease 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.
Free Windows Admin Tool Kit Click here and download it now
July 11th, 2011 3:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics