Solved

Exchange 2010 SP3 - Export all mail from date and going forward

Posted on 2014-12-13
5
85 Views
Last Modified: 2015-03-01
Hi EE,

I'm using:

  $a=Get-Mailbox -Identity "*"
 
  PS C:\Windows\system32> $a |%{
>> $pst=$_.alias+".pst"
>> New-MailboxImportRequest -Mailbox $_.alias -FilePath "\\10.97.113.117\smartware\ExchExport\CurrentEmp\$pst"  -BadItemLimit 100 –AcceptLargeDataLoss –AssociatedMessagesCopyOption copy
>> }

No what would I use to export all mail after 11/30/2014?

Tight deadline by manager.  Any info is much appreciated.
0
Comment
Question by:MacGyver80
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Ivan
ID: 40498316
Hi there,

try something like this, for a single user.

New-MailboxExportRequest -Mailbox "user"  -ContentFilter {(Received -gt 11/30/2014)}  -FilePath "\\10.97.113.117\smartware\ExchExport\CurrentEmp\user.pst"

I don't have exchange to try, but I think it should work.

Regards,
0
 
LVL 18

Expert Comment

by:irweazelwallis
ID: 40498318
New-MailboxExportRequest -ContentFilter {(Received -lt '04/01/2010') -and (Received -gt '03/01/2010')} -Mailbox "xx" -Name xx -FilePath \\ExServer1\Imports\Xxx.pst

You can use -received or -sent
Then -lt for less than
-gt for greater than
-ge for greater than or equal to

You should be able to just swap import for export, drop the bad item limit and then add the content filter in and the code you already have should work
0
 
LVL 5

Author Comment

by:MacGyver80
ID: 40498364
Thank you irweazelwalls.

However, I'm trying to export the entire Mail Database.
0
 
LVL 18

Accepted Solution

by:
irweazelwallis earned 500 total points
ID: 40498622
Ok so easy way is to use a CSC

Get-mailbox database xxx | get-mailbox | fl display name >c:\mailbox.csv

Take that csv and use in second script

$mailbox = import-csv c:\mailbox.csv

For each ($user in $mailbox) {new -mailboxexportrequest $user.displayname -file path \\server\share\$user.displayname.pst -content filter ....... }

File in what you want as content filter and the above should be mostly right (give or take a  typo or dodgy memory)
0
 
LVL 5

Author Closing Comment

by:MacGyver80
ID: 40638356
Worked like a charm. Thank you for the guidance.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
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…
how to add IIS SMTP to handle application/Scanner relays into office 365.

828 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