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:
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?
PowershellExchangeOutlookWindows OS
Last Comment
danbrown_
8/22/2022 - Mon
FOX
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
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_
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.
timgreen7077
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_
ASKER
DO you know of a third party tool that would do this?
Exchange Trusted Subsystem and give the group Read/Write permission
2. Right-click that same folder again>properties>Sharing..
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.