Solved

Exchange 2010 Delete

Posted on 2011-09-27
5
319 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
  • 3
5 Comments
 
LVL 26

Accepted Solution

by:
e_aravind earned 250 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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 250 total points
Comment Utility
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
Comment Utility
Thanks for the points!
0

Featured Post

Do email signature updates give you a headache?

Do you feel like you are constantly making changes to email signatures? Are the images not formatting how you want them to? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today.

Join & Write a Comment

Suggested Solutions

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
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…
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…

772 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

12 Experts available now in Live!

Get 1:1 Help Now