Solved

Exchange 2010 Delete

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

Suggested Solutions

Title # Comments Views Activity
Keeping a local copy of Exchange mailbox over 50GB 21 76
Export Exchange Cert 5 39
Intune/ Microsoft EMS 1 28
Exchange 2013 certificate 8 33
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…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
To show how to generate a certificate request 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 >> Certificates…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

813 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

8 Experts available now in Live!

Get 1:1 Help Now