none
Search and move/delete an email from an outside address RRS feed

  • Question

  • We get an email from the same guy about once every 6 months ranting about his poor experience and so on and so on. He sends it to our entire staff. I have tried cdmlets in the past, but have always resorted to granting myself full access into the employees accounts and deleting the email person by person. There has to be an easier way to pull the email out of everyone's inbox and just resend it to the people that need to know. Can anyone help me on this?

    p.s I have an email right now that I need to pull out and am frantically trying to update my Outlook boxes to be able to see all the inbox's.

    Thanks,

    Jay

    Monday, January 28, 2013 5:58 PM

Answers

  • Please see this article as it has two commands to run through powershell.  This moves messages to a temp mailbox called exchsvc so replace that with a different mailbox before running.  Also the Message subject is only an example to you can remove that and replace with -Sender if you like.

    Pull Messages with this criteria into ExchSVC but do not delete.

    get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery 'Subject:"You have received a secure message"' -TargetMailbox exchsvc -TargetFolder DeleteMsgs -LogLevel Full

    After verification, add the -DeleteContent and the messages will be sent to ExchSVC again but deleted from users' mailbox

    get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery 'Subject:"You have received a secure message"' -TargetMailbox exchsvc -TargetFolder DeleteMsgs -LogLevel Full -DeleteContent


    Jason Apt, Microsoft Certified Master | Exchange 2010 My Blog

    • Proposed as answer by Sukh828 Monday, January 28, 2013 6:47 PM
    • Marked as answer by C_J_GO Monday, January 28, 2013 9:51 PM
    Monday, January 28, 2013 6:28 PM

All replies

  • Please see this article as it has two commands to run through powershell.  This moves messages to a temp mailbox called exchsvc so replace that with a different mailbox before running.  Also the Message subject is only an example to you can remove that and replace with -Sender if you like.

    Pull Messages with this criteria into ExchSVC but do not delete.

    get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery 'Subject:"You have received a secure message"' -TargetMailbox exchsvc -TargetFolder DeleteMsgs -LogLevel Full

    After verification, add the -DeleteContent and the messages will be sent to ExchSVC again but deleted from users' mailbox

    get-mailbox -resultsize unlimited | Search-Mailbox -SearchQuery 'Subject:"You have received a secure message"' -TargetMailbox exchsvc -TargetFolder DeleteMsgs -LogLevel Full -DeleteContent


    Jason Apt, Microsoft Certified Master | Exchange 2010 My Blog

    • Proposed as answer by Sukh828 Monday, January 28, 2013 6:47 PM
    • Marked as answer by C_J_GO Monday, January 28, 2013 9:51 PM
    Monday, January 28, 2013 6:28 PM
  • Thanks Jason, that worked perfectly. Now, another thread to keep that email address to only sending email to a couple recipients.

    Jay

    Monday, January 28, 2013 9:52 PM