Winsoup
asked on
Retract Spam Email from Exchange 2010
Is it possible to retract one email from all mailboxes in exchange 2010?
Say a spam email gets through and we want to delete it before everyone has a chance to open it and click on something they shouldn't, how can I remove that message from their mailbox?
Say a spam email gets through and we want to delete it before everyone has a chance to open it and click on something they shouldn't, how can I remove that message from their mailbox?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you tried adding back -TargetMailbox and possibly -TargetFolder after the -DeleteContent command?
I know that every time someone asks me to do something like this it is always a pain.
I know that every time someone asks me to do something like this it is always a pain.
ASKER
I added back targetmailbox and targetfolder and now I get this error for all mailboxes.
The input object cannot be bound to any parameters for the command either because the command does not take pipeline input
or the input and its properties do not match any of the parameters that take pipeline input.
The input object cannot be bound to any parameters for the command either because the command does not take pipeline input
or the input and its properties do not match any of the parameters that take pipeline input.
All I can think of is try -targetmailbox only after -Deletecontent
Like I said everytime I have been asked to do this specific thing (find an email in all mailboxes or single mailbox) and delete it I always run into issues.
Like I said everytime I have been asked to do this specific thing (find an email in all mailboxes or single mailbox) and delete it I always run into issues.
ASKER
This works, I screwed up the Permissions part of it at the beginning of that article so I didn't have rights to delete anything. Once that was fixed that then it worked fine.
Thank you!
Thank you!
Thanks, glad you got it worked out.
ASKER
Sorry one more question on this.
Is there a way to force it to delete right away without having to refresh or restart outlook? The command is working but I can still access the email until I restart Outlook.
Is there a way to force it to delete right away without having to refresh or restart outlook? The command is working but I can still access the email until I restart Outlook.
A server side change should be reflected within about 30 seconds or so.
If your mailbox did not reflect the change within that time or took significantly longer you might have another issue.
Here is a link to an article about the sync intervals.
http://www.msoutlook.info/question/300
If your mailbox did not reflect the change within that time or took significantly longer you might have another issue.
Here is a link to an article about the sync intervals.
http://www.msoutlook.info/question/300
ASKER
Get-mailbox | search-mailbox –searchquery “Subject:’virus’” –DeleteContent
I get this error:
The target mailbox or .pst file path is required.
+ CategoryInfo : InvalidArgument: (:) [], ArgumentException
+ FullyQualifiedErrorId : 72962C6B
Invoke-Command : Cannot write input as there are no more running pipelines
At C:\Users\username\AppData\
cal.psm1:42015 char:29
+ $scriptCmd = { & <<<< $script:InvokeCommand `
+ CategoryInfo : InvalidOperation: (:) [Invoke-Command], PSInvalidOperationExceptio
+ FullyQualifiedErrorId : NoMoreInputWrite,Microsoft