0

I'm trying a New-MailBoxExportRequest to Export Mailbox to a .pst

If I use this command, everything works!

New-MailboxExportRequest -Mailbox <user> -ContentFilter {Received -lt '05/27/2015 18:00'}-FilePath \\Server\name.pst -ExcludeFolders “#Calendar#” -ExcludeDumpster

HOWEVER If I add multiple properties for the diffirent parameters, the command errors out!Invalid Syntax

New-MailboxExportRequest -Mailbox <user> -ContentFilter {Received -lt '05/27/2015 18:00'}{Sent -lt '05/27/2015 18:00'}-FilePath \\Server\name.pst  -ExcludeFolders “#Calendar#,#Contacts#” -ExcludeDumpster

Any Help?

Benjamin Jones
  • 326
  • 1
  • 9
  • 23

1 Answers1

2

You need an operator between your chained filters, like so:

New-MailboxExportRequest -Mailbox <user> -ContentFilter {(Received -lt '05/27/2015 18:00') -or (Sent -lt '05/27/2015 18:00')} -FilePath \\Server\name.pst  -ExcludeFolders “#Calendar#,#Contacts#” -ExcludeDumpster
Stephen F
  • 293
  • 1
  • 8