?
Solved

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

Posted on 2014-12-13
5
Medium Priority
?
90 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 17

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 2000 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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Suggested Courses

801 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