Exchange contact export failing

danbrown_
danbrown_ used Ask the Experts™
on
Hello Experts - I made a post yesterday asking about the syntax for exporting Outlook contacts from an Exchange 2010 server limited by a date range.  I thought I had it since the command ran without errors but the output has no data so I closed it too soon.  Here is the command I'm running:

New-MailboxExportRequest -ContentFilter {(Received -lt '01/01/2019') -and (Received -gt '02/06/2019')} -Mailbox user1@domain.com -IncludeFolders "#Contacts#" -excludedumpster -filepath \\server\c$\contacts\user.pst

This returns a 256KB PST file which is empty regardless of the date range or user I am running it against.  Do I have this setup right?  Maybe something that only works in later versions of Exchange?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
FOXActive Directory/Exchange Engineer
Top Expert 2015

Commented:
1. On the folder where you want to drop the results, right click> select properties>Security and make sure you have added the group
Exchange Trusted Subsystem and give the group Read/Write permission

2. Right-click that same folder again>properties>Sharing...copy the "network path" and put it after -filepath in your command


New-MailboxExportRequest -Mailbox user1@domain.com -IncludeFolders "#Contacts#" -ContentFilter {(Received -lt '01/01/2019') -and (Received -gt '02/06/2019')} -FilePath -filepath \\server\c$\contacts\user.pst
timgreen7077Exchange Engineer
Distinguished Expert 2018

Commented:
You can create the cmdlets like this:

New-MailboxExportRequest -Mailbox "username" -IncludeFolders "#contacts#" -FilePath "\\sharepath\temp\contacts.pst"

Since you are getting the contacts I'm not sure the date range will apply properly since contacts don't have a sent or received date associated to it. I just tested the cmdlets I shared and it worked properly.
danbrown_IT Manager

Author

Commented:
I have no problems exporting the entire set of contacts but needed to restrict it by date to capture them incrementally since I've already exported everything as of May 2018.  I just need contacts created after that date to avoid the duplicates.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

danbrown_IT Manager

Author

Commented:
I think you may be right about the date range, no matter how I format it I'm getting an empty 256KB PST file as the output.
timgreen7077Exchange Engineer
Distinguished Expert 2018

Commented:
agreed, but since a sent or received date isnt associated with a contact those parameters in the cmdlets wont apply to contacts, and I dont think a created date parameter is available for the cmdlets so you may have to use a 3rd party tool to accomplish this based on date range.
danbrown_IT Manager

Author

Commented:
DO you know of a third party tool that would do this?
Exchange Engineer
Distinguished Expert 2018
Commented:
danbrown_IT Manager

Author

Commented:
Wow, that works great, thanks so much!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial