Hello,
I'm trying to export some specific emails out from an existing mailbox to a .pst for now. The criteria is two different domains located in the BCC/CC/To and Sender fields in a singular export. I'm not sure where this is going wrong other than perhaps I should just use the -like All filter, but I would like to get this to work if possible. I'm on Exchange 2010 SP2 running this from the EMS on a CAS/HUB server.
New-MailboxExportRequest –Mailbox testmb –contentfilter {(BCC –like “*@domain1.com”) –or (BCC –like “*@domain2.com”) –and (CC –like “*@domain1.com”) –or (CC –like “*@domain2.com”) –and (To –like “*@domain1.com”) –or (To –like “*@domain2.com”) –and (Sender –like “*@domain1.com”) –or (Sender –like “*@domain2.com”)} –FilePath c:\PSTFiles\test.pst –includefolders “#Test Emails#”
I'm sure this is down to syntax, but not sure where. The error returns as
The provided ContentFilter value is invalid. ContentFilter is invalid. ""
I've also tried replacing the -like and "*@domain1.com" with -eq and '*@domain.com'
Any insight would be much appreciated.
Thank you in advance