Deleting an e-mail sent to all users from exchange 2007

Someone has just mistakenly sent an e-mail to all users. Is there anyway I can remove all unread copies of this e-mail before the weekend is over?

I know I could attempt to reacall/replace the e-mail, but I'm afraid this depends on the recipient agreeing to the recall. Is there a way my Exchange admins can remove this message from the Exchange Information Store using the message ID?

Thanks
Gospodin RasputinIT ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Will SzymkowskiSenior Solution ArchitectCommented:
You can use the Export-Mailbox cmdlet to accomplish this. See the below script...
Get-Mialbox -ResultSize "Unlimited" |
Export-Mailbox -PSTFolderPath "C:\pstfiles\filename.pst" -BadItemLimit 1000000 -ContentKeywords "CLICK HERE TO Upgrade" -DeleteContent -Confirm:$false

Open in new window


The above script will get all mailboxes and export the results to a pst file and delete the email from all of the mailboxes where "Click Here To Upgrade" is in the body or the subject line.

Will.
0
AmitIT ArchitectCommented:
In 2007, you can use export-mailbox cmd let to search and delete specific email. Here is MS KB with all required steps:
http://blogs.technet.com/b/exchange/archive/2010/10/27/3411398.aspx
0
Gospodin RasputinIT  ManagerAuthor Commented:
Hi Amit,
I'm using the following but it seems to be complaning because I have not specified thethe target mailbox.

Get-Mailbox -ResultSize Unlimited | Export-Mailbox -ContentKeywords "REC_2999.wmv" -StartDate "15/06/2010" -EndDate "18/06/2010" -DeleteContent

But I wish to just remove the message without copying it to anywhere else.

Any idea? I suspect maybe I should remove the |Export -Mailbox from the command.

The error I get on all the mailboxes is as follows:

Export-Mailbox : Error was found for Udojil Alexander (Udojil.Alexander@mydomain.o
rg.uk) because: Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error:
MAPI or an unspecified service provider.
ID no: 00000000-0000-00000000, error code: -1056749164
At line:1 char:51
+ Get-Mailbox -ResultSize Unlimited | Export-Mailbox <<<<  -ContentKeywords "RE
C_2999.wmv" -StartDate "15/06/2010" -EndDate "18/06/2010" -DeleteContent
    + CategoryInfo          : InvalidOperation: (540:Int32) [Export-Mailbox],
   RecipientTaskException
    + FullyQualifiedErrorId : E05CA502,Microsoft.Exchange.Management.Recipient
   Tasks.ExportMailbox
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

AmitIT ArchitectCommented:
In 2007 that was the limitation, which is removed in 2010 or above. You need to provide target mailbox. You can create or use test mailbox as target mailbox. Later, you can clean up target mailbox.
0
Gospodin RasputinIT  ManagerAuthor Commented:
What should the name of the target mailbox be? What format? The usernames format? Not exactly sure how mailbox is names in Exchange 2007...will try the username format and see.
Thank you
0
Will SzymkowskiSenior Solution ArchitectCommented:
It is not a requirement for a mailbox. You can use just use a PST file instead, as I have illustrated in my first post.

Will.
0
AmitIT ArchitectCommented:
As Will said, use PST. Either mailbox or PST you need to export it somewhere in 2007.
0
Gospodin RasputinIT  ManagerAuthor Commented:
Tried to specify target mailbox and it is telling me the source and target are the same.

I thought the cmd searches for any messages marching the criteria and deletes it. Does it search in the target mailbox only!!
My Command is : Get-Mailbox -ResultSize Unlimited | Export-Mailbox -ContentKeywords "REC_2999.wmv" -TargetMailbox TEST -TargetFolder 'DeleteMsg' -DeleteContent

The new error message is:
Export-Mailbox : The source mailbox 'Test' and target mailbox 'Test' are the same, and is not supported by this command.
At line:1 char:51
+ Get-Mailbox -ResultSize Unlimited | Export-Mailbox <<<<  -ContentKeywords "RE
C_0002.wmv" -TargetMailbox Test -TargetFolder 'DeleteMsg' -DeleteContent
    + CategoryInfo          : InvalidArgument: (155:Int32) [Export-Mailbox], R
   ecipientTaskException
    + FullyQualifiedErrorId : B7EE2B39,Microsoft.Exchange.Management.Recipient
   Tasks.ExportMailbox
0
Will SzymkowskiSenior Solution ArchitectCommented:
Just use a the -PSTFolderPath switch. You cannot use the same mailbox as the Target mailbox.

Will.
0
Gospodin RasputinIT  ManagerAuthor Commented:
OK Will. I'll try that and let you know.
Thanks for your help.
0
Murali ReddyExchange ExpertCommented:
Because it searching the Test mailbox too, when you have not specified in the filter, just exempt it.

Makwe sure you aslways specify a date range, otherwise the command deletes any old messages matching the subjected criteria.

Something like..

Get-Mailbox -ResultSize Unlimited |Where-Object {!($_.Alias -eq "Test")} |Export-Mailbox -ContentKeywords "REC_2999.wmv" -StartDate "15/06/2010" -EndDate "18/06/2010" -TargetMailbox TEST -TargetFolder 'DeleteMsg' -DeleteContent
0
AmitIT ArchitectCommented:
I assume you got the answer already. You need to exclude this mailbox.
0
Gospodin RasputinIT  ManagerAuthor Commented:
Hi Will,
Please can you expand your command for me. I am trying to search all the inbox in my information store for a mesage titled "REC_2999.wmv" and delete them all.

In your command, is -PSTFolderPath "C:\pstfiles\filename.pst" the source where you are deleting from or the destination (target folder where you are deleting to?

I just looked at your command and it confused me now, maybe

Thank you
0
Gospodin RasputinIT  ManagerAuthor Commented:
Hi Will/ Amit,
When I use the -PSTFolderPath switch, it complains about me using a 64bit system and the command being for 32bit system with outlook 2003 installed in it.

Any other suggestions?
Thank you
0
Will SzymkowskiSenior Solution ArchitectCommented:
In Exchange 2007 this is another limitation as you will need to use a 32bit workstation to export the items to a PST file. Use a 32bit client machine.

Will.
0
Gospodin RasputinIT  ManagerAuthor Commented:
And on a 32bit client machine, how do I run the Exchange shell?
I was running these commands on the Exchange 2007n Server.
Thank you
0
Will SzymkowskiSenior Solution ArchitectCommented:
You need to install the 32bit Management Tools for Exchange 2007.  Once you have that installed you will be able to export to PST with no issues.

Will.
0
Gospodin RasputinIT  ManagerAuthor Commented:
Where do i install this tool? On the exchange Server or ona workstation.
Thank you
0
Will SzymkowskiSenior Solution ArchitectCommented:
Workstation. Launch the Exchange 2007 Media on a workstation, and when you get to the screen to install the roles, just select the management tools.

Once this is installed the re-run the script.

Will.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Gospodin RasputinIT  ManagerAuthor Commented:
Hi Will,
I shall try this and let you know.
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.

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.