Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Remove all messages on Exchange Mailbox

Posted on 2013-01-20
4
Medium Priority
?
322 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 1200 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 800 total points
ID: 38800774
export-mailbox -identity "john" -PSTFolderPath c:\temp\Exchange -Deletecontent
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
Are you an Exchange administrator employed with an organization? And, have you encountered a corrupt Exchange database due to which you are not able to open its EDB file. This article will explain all the steps to repair corrupt Exchange database.
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…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

722 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