1

I am trying to export items out of a mailbox, sent and received between a certain date on Exchange 2016. However the script keeps failing without an error message. Not sure where I am going wrong....

New-MailboxExportRequest -Mailbox "User" -ContentFilter "(Received -lt '02/11/2021') -and (Received -gt '02/15/2021')" -Name User  -FilePath \\server\PSTExport\user.pst

Current Script above.

Require both sent and received, which I presume would be changing the received to sent but the date range still doesn't work. Already aware that it seems to hate UK dates.

Any help would be greatly appreciated.

  • Is there any output at all? Do any exports show when you run`Get-MailboxExportRequest`? What happens when you run the command without a content filter? – Ianteu Feb 15 '21 at 12:17
  • Hello, without a content filter it works fine, but obviously the full mailbox. When I just run Get-MailboxExportRequest it has the request name and says Failed next to it. – BrackleyMan Feb 15 '21 at 12:29
  • I think you have your conditions the wrong way round. Should it not be `"(Received -gt '02/11/2021') -and (Received -lt '02/15/2021')"`. Since you want it to be after 11th Feb but before 15th Feb? – Ianteu Feb 15 '21 at 14:39

0 Answers0