• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2140
  • Last Modified:

Exchange 2010 PST export & delete by date range

Hello,

I need to export by date range then delete from mailbox.  In 2007 we used to just add the -deletecontent at the end.  That no longer exists.  This is the export command we use:

New-MailboxExportRequest -mailbox MyMailbox -filepath "\\v1ussrvfs01\ArchiveEmail\2011_test.pst" -contentfilter {(received -lt '02/01/2011') -and (received -gt '01/01/2011')}

How do I get exchange to export and delete by data range?

thanks
0
BBQSTEAK
Asked:
BBQSTEAK
  • 2
  • 2
1 Solution
 
AkhaterCommented:
Bad news you cannot ! what you can do is issue after the export a Search-Mailbox cmdlet with the “-DeleteContent” parameter. See http://technet.microsoft.com/en-us/library/dd298173.aspx
0
 
BBQSTEAKAuthor Commented:
hmmm, maybe some way to do it with a multi-line script using some logic..  weird..
0
 
AkhaterCommented:
i am sorry i didn't get what you mean
0
 
BBQSTEAKAuthor Commented:
Just thinking there must be a way to script this,, I can't believe we LOSE features.. sigh..

thanks akhater!
0
 
wilsonkjitCommented:
Does this -DeleteContent switch also work for specific date ranges? I cannot seem to figure this out....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now