Solved

Exchange 2010 Delete

Posted on 2011-09-27
5
321 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
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 250 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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…
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 Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

896 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

13 Experts available now in Live!

Get 1:1 Help Now