Is there a way we can delete a specific email thats sent from ouside the organization to a group of people from there mailboxes before they read it.

Hi,

Is there a way we can delete a specific email thats sent from ouside the organization to a group of people from there mailboxes before they read it.

regards
Sharath
LVL 11
bsharathAsked:
Who is Participating?
 
AndrewSwingewoodConnect With a Mentor Commented:
I am not sure about the syntax provided by GusGallows.  My syntax may prompt for approval before deleting the item for each box, however this can be overcome by adding the following switch to the end of the line:

-confirm:$false

Get-Mailbox -Identity ktaber | Export-Mailbox -SubjectKeywords “Confidential reports” -StartDate “06/09/2009" -DeleteContent -confirm:$false

The following is code direct from microsoft that outlines the deleting of items from a mailbox:

Get-Mailbox -Database DB1 | Export-Mailbox -SubjectKeywords "Virus message" -DeleteContent

Note that there is no argument supplied to DeleteContent
0
 
rockiroadsCommented:
you need a spam filter I reckon. have a read of this guide http://www.msexchange.org/tutorials/Exchange-Spam.html
0
 
EmptyoneCommented:
If you want to block a specific mail you can use Transport rules. Just be specific enough in what you fill out, so you don't block mails you want to have through. But which version of Exchange is this? And do you mean a mail that's already in their mailbox?
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
bsharathAuthor Commented:
I dont want to block. But delete mails thats already been sent from every mailbox
Exchange 2007
0
 
integrate-itCommented:
Hi,

try using ExMerge. I know, it's not offical supported but it works (http://www.exchangeinbox.com/article.aspx?i=88)

best regards
0
 
rupeshsainiCommented:
You can only filter the message ,you cannot delete it whenever it comes.
0
 
AndrewSwingewoodCommented:
The following powershell commands should do what you need, you just need to modify the command to match your infrastructure:

Across all mailboxes

Get-Mailbox -Server EXCHSVR01 | Add-MailboxPermission -User Admin01 -AccessRights Fullaccess -InheritanceType all
Get-Mailbox -Server EXCHSVR01 | Export-Mailbox -SubjectKeywords “Confidential reports” -StartDate “06/09/2009¿ -DeleteContent

For just certain mailboxes

Get-Mailbox -Identity ktaber | Add-MailboxPermission -User Admin01 -AccessRights Fullaccess -InheritanceType all
Get-Mailbox -Identity ktaber | Export-Mailbox -SubjectKeywords “Confidential reports” -StartDate “06/09/2009¿ -DeleteContent

After running the command the messages will disappear from Outlook immediately.

To see more parameters and examples please visit: http://technet.microsoft.com/en-us/library/aa998579.aspx
0
 
AndrewSwingewoodCommented:
Sorry, as a quick update, there seems to be an issue with the text format (upside-down ?).  The correct format is:

The following powershell commands should do what you need, you just need to modify the command to match your infrastructure:

Across all mailboxes

Get-Mailbox -Server EXCHSVR01 | Add-MailboxPermission -User Admin01 -AccessRights Fullaccess -InheritanceType all

Get-Mailbox -Server EXCHSVR01 | Export-Mailbox -SubjectKeywords “Confidential reports” -StartDate “06/09/2009" -DeleteContent

For just certain mailboxes

Get-Mailbox -Identity ktaber | Add-MailboxPermission -User Admin01 -AccessRights Fullaccess -InheritanceType all

Get-Mailbox -Identity ktaber | Export-Mailbox -SubjectKeywords “Confidential reports” -StartDate “06/09/2009" -DeleteContent
0
 
GusGallowsConnect With a Mentor Commented:
I think the -DeleteContent without and argument defaults to false. So for the last line of the code provided by AndrewSwingewood use the following:

Get-Mailbox -Identity ktaber | Export-Mailbox -SubjectKeywords “Confidential reports” -StartDate “06/09/2009" -DeleteContent:$TRUE

Other than that, the powershell code should work. Otherwise you will need a tool like Mail Attender for Exchange to pull specific messages out of mailboxes where it is found.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.