cancel
Showing results for 
Search instead for 
Did you mean: 

Export-EVArchive using "OR" operator

hlipsey
Level 1

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: (:) [Export-EVArchive], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Symantec.EnterpriseVault.PowerShell.Commands.
Export.ExportArchivePS

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

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

TIA,

Henry

2 REPLIES 2

TonySterling
Moderator
Moderator
Partner    VIP    Accredited Certified

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

ChrisLangevin
Level 6
Employee

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

--Chris