Export-EVArchive using "OR" operator

I'm trying to run an Export-EVArchive that will search for all messages to or from multiple addresses but cannot get the "OR" operator to work.  Here is an example:

PS E:\Program Files (x86)\Enterprise Vault> Export-EVArchive -ArchiveID 16....evserver1 -OutputDirectory E:\User1 -SearchString to:aaa@aaa.com -or to:bbb@bbb.com -Format pst

I receive this error message:
Export-EVArchive : A parameter cannot be found that matches parameter name 'or'.
At line:1 char:140
+ ... aaa@aaa.com -or to:bbb@bbb.com -Format ps
+                             ~~~
+ CategoryInfo : InvalidArgument: (Smiley Happy [Export-EVArchive], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Symantec.EnterpriseVault.PowerShell.Commands.

Is the -or operator not supported in the -SearchString parameter?

Is there a better way to export the messages without Discovery Accelerator?



2 Replies

Re: Export-EVArchive using "OR" operator

Or is a valid operator.  can you try it without the - infront of the or ?


So like this: to:aaa@aaa.com OR bbb@bbb.com -Format pst

For the best O365 Reporting Solution click here Radar-Reporting

Re: Export-EVArchive using "OR" operator

You need to place quotation marks around your multi-word SearchString parameter so PowerShell knows it's all a single string. And the EV Search syntax doesn't use a hyphen in front of the OR operator.

Try it like this:

Export-EVArchive -ArchiveID 16....evserver1 -OutputDirectory E:\User1 -SearchString "to:aaa@aaa.com OR to:bbb@bbb.com" -Format pst