Solved

Remove all messages on Exchange Mailbox

Posted on 2013-01-20
4
314 Views
Last Modified: 2013-01-21
After exporting the mails for a mailbox in Exchange 2007, what shell command can be used to clean up all the message for the mailbox ?

Tks

export-mailbox -identity "john" -PSTFolderPath c:\temp\Exchange
0
Comment
Question by:AXISHK
  • 2
4 Comments
 
LVL 10

Expert Comment

by:joelsplace
Comment Utility
Use Search-mailbox with the -deletecontent switch:
 
http://technet.microsoft.com/en-us/library/dd298173.aspx
0
 

Author Comment

by:AXISHK
Comment Utility
Search-Mailbox -Identity "test" -SearchQuery -DeleteContent

'Search-Mailbox" is not recognized as a cmdlet, function, opperable program or script file.

Any idea ? We are running Exchange 2007. Tks
0
 
LVL 10

Accepted Solution

by:
joelsplace earned 300 total points
Comment Utility
I didn't realize that doesn't work on pre 2010.
This should:
Get-content c:\11MailboxesList.txt | Get-mailbox | Export-Mailbox -DeleteContent
 
 http://msexchangeteam.com/archive/2006/11/28/431669.aspx
0
 
LVL 15

Assisted Solution

by:Rajkumar-MCITP
Rajkumar-MCITP earned 200 total points
Comment Utility
export-mailbox -identity "john" -PSTFolderPath c:\temp\Exchange -Deletecontent
0

Featured Post

The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now