Exporting PST using powershell

I am trying to export mailbox using powershell for users starting from one particular date in past till now.
Inbox items are fetched properly for all users, but sent items dont. For some users sent items are fetched fine from that date till now but for some sent items are empty.
I verified by going to user mailbox and there are sent items between the dates.

Command I am using to Export mail box is :

New-MailboxExportRequest -ContentFilter {(Received -gt '02/13/2018')} -Mailbox username@domain.ca
 -FilePath "\\fileserver\PST\userpst.pst"

Can anyone tell me why it would export "sent items" for some users and not for others ?

Thanks in advance !
Nick PerksIT DirectorAsked:
Who is Participating?
 
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
I think you should check the PSTs files with outlook and make sure that the "Sent items" are there, and it contains information in the folder that goes with your requirement.

I also think that you are asking to the exportrequest cmdlet to get the "RECEIVED mails after 02/13/2018" this should not work for the sent files since those emails aren't "received".

Jose.
4
 
Sara TeasdaleCommented:
For single user:
Export-Mailbox –Identity <mailboxUser> -PSTFolderPath <pathToSavePST> -StartDate 1/1/2018 -EndDate 12/1/2018
For particular DB:
Get-Mailbox -Database 'MDB' | Export-Mailbox -PSTFolderPath D:\PSTs -StartDate 1/1/2018 -EndDate 12/1/2018
* make sure that you are running from EMS 32 bit version
for more details http://blogs.technet.com/b/exchange/archive/2007/04/13/3401913.aspx
hope this may helps.
2
 
Nick PerksIT DirectorAuthor Commented:
Yes I checked the PSTs by exporting using different dates and export works fine for this mailbox for dates starting 02/13/2018, but no sent items are displayed.

When I ran this command for another user, sent items were also exported. Even though the command has "recieved" word it works for sent items as well but not on all mailboxes which is strange.

I only want to export emails after this date for all mail folders including sent items.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Veerappan SundaramSenior Technical ConsultantCommented:
Below command should work for single user and export all email after 13-Feb-2018.

New-MailboxExportRequest -Mailbox username@domain.ca -ContentFilter {(Received -gt '02/13/2018') -or (Sent -gt '02/13/2018')} -FilePath \\fileserver\PST\userpst.pst -ExcludeDumpster

ExcludeDumpster is to remove the Hard Deleted email (either Shift+Delete or Cleared from Deleted Items)

Note: Date format depends on the server settings - MM/DD/YYYY or DD/MM/YYYY
1
 
Marshal HubsEmail ConsultantCommented:
15.jpgYou can export mailbox using Stellar EDB to PST Converter for users starting from one particular date in past till now. You can search for specific emails based on different criteria such as ‘To’, ‘From’, ‘Cc’, ‘Subject’, ‘Body’, ‘Attachment Name’, 'Date' and can export it in PST format. Download the demo version from here: https://www.stellarinfo.com/email-repair/edb-pst-converter.php
2
 
Annie RoseTech LeadCommented:
Try and specify your date range with the 'ContentFilter' switch.

Ex:

New-MailboxExportRequest -Mailbox XXXXX -FilePath "\\XXXXX\lXXXX$\Corp\XXXXXX\XXXXX_MB.pst -ContentFilter {(received -lt "01/12/2018") -and (received -gt "04/12/2018")}

Another option is to try this export edb to pst solution which offers you with the facility to filter and manage the EDB files according to the date of the items.

Date range exports with New-MailboxExportRequest:
https://thoughtsofanidlemind.com/2011/10/21/date-range-exports-with-new-mailboxexportrequest/

Export Exchange mailboxes to PST file using Powershell cmdlet:
http://expert-advice.org/exchange-server/export-exchange-mailboxes-pst-file-using-powershell-cmdlet/
3
 
Nick PerksIT DirectorAuthor Commented:
Thank you all the answers were great. Just choosing Veerapan's as that was spot on.
0
 
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
So no other answer was helpful for you?
...
0
 
Nick PerksIT DirectorAuthor Commented:
all of them were helpful, I am new to EE so forgot to choose helpful button prior to choosing the answer. I will keep in mind next time.

Cheers
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.

All Courses

From novice to tech pro — start learning today.