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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jose Gabriel Ortega CastroCEOCommented:
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".


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
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.
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

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
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
Annie RoseTech LeadCommented:
Try and specify your date range with the 'ContentFilter' switch.


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:

Export Exchange mailboxes to PST file using Powershell cmdlet:
Nick PerksIT DirectorAuthor Commented:
Thank you all the answers were great. Just choosing Veerapan's as that was spot on.
Jose Gabriel Ortega CastroCEOCommented:
So no other answer was helpful for you?
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.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.