05-21-2019 05:21 AM
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
05-21-2019 10:36 AM
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
06-03-2019 12:45 PM
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