Link to home
Start Free TrialLog in
Avatar of danbrown_
danbrown_Flag for United States of America

asked on

Exchange contact export failing

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?
Avatar of FOX
FOX
Flag of United States of America image

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
Avatar of timgreen7077
timgreen7077

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.
Avatar of danbrown_

ASKER

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.
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.
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.
DO you know of a third party tool that would do this?
ASKER CERTIFIED SOLUTION
Avatar of timgreen7077
timgreen7077

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Wow, that works great, thanks so much!