Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Exchange 2010 Delete

Posted on 2011-09-27
5
Medium Priority
?
330 Views
Last Modified: 2012-05-12
After having run an Export-Mailbox command I would like to now DELETE the exported email . . . so I can clean up the mailbox size. What is the correct command?

PS - If anyone knows I am having trouble with the syntax from a previous question
http://www.experts-exchange.com/Software/Server_Software/Email_Servers/Exchange/Q_27313428.html
0
Comment
Question by:Starquest321
[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
  • 3
5 Comments
 
LVL 26

Accepted Solution

by:
e_aravind earned 1000 total points
ID: 36718448
did you get a chance to run the commandlet with the option "delete content"?

Sample:
To find and delete items from a group of mailboxes, such as all mailboxes on a database, run the following command:

Copy Code Get-Mailbox -Database DB1 | Export-Mailbox -TargetMailbox ExportMailbox -TargetFolder VirusData -SubjectKeywords "Virus message" -DeleteContent

Reference:
http://technet.microsoft.com/en-us/library/bb266964(EXCHG.80).aspx
0
 
LVL 17

Expert Comment

by:lucid8
ID: 36718734
With 2010 SP1 and greater you have to use the Search-Mailbox command with the DeleteContent parameter. Check out http://technet.microsoft.com/en-us/library/dd298173.aspx
0
 

Author Comment

by:Starquest321
ID: 36936080
Will the search mail command also EXPORT the mail to a pst and delete the originals ALL in one command?
0
 
LVL 17

Assisted Solution

by:lucid8
lucid8 earned 1000 total points
ID: 36936126
No alas they took that option away so you must do two commands if you want to export, however that said you can copy the results to a target mailbox and delete from source in one command.  

So you could set up a SearchTargetResults mailbox if you will, do the search for xxx then copy to SearchTargetResults mailbox and  delete from source.  Then use the export command to export the contents of the SearchTargetResults mailbox  
0
 
LVL 17

Expert Comment

by:lucid8
ID: 37030000
Thanks for the points!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
Are you looking for the options available for exporting EDB files to PST? You may be confused as they are different in different Exchange versions. Here, I will discuss some options available.
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

604 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