Solved

Remove all messages on Exchange Mailbox

Posted on 2013-01-20
4
321 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 10

Expert Comment

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

Author Comment

by:AXISHK
ID: 38799897
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
ID: 38799903
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
ID: 38800774
export-mailbox -identity "john" -PSTFolderPath c:\temp\Exchange -Deletecontent
0

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
How to resolve IMCEAEX NDRs in Exchange or Exchange Online related to invalid X500 addresses.
In this video we show how to create a Shared Mailbox 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 Recipients >> Sha…
In this video we show how to create an Accepted Domain 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 Mail Flow >> Ac…
Suggested Courses

623 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