cancel
Showing results for 
Search instead for 
Did you mean: 

searchstring for export-archive

sandrine_goetha
Moderator
Moderator
   VIP   

Hello,

I once again need your help.

I was asked to provide an export in EML format which means using the export-archive cmdlet ( no issue there)

Where I have problems is in the construction of my searchstring ( I have different criteria s)

-from x@email or y@email

-has attachement

-during a defined period of time

When I try each of this criteria alone it works but as soon as I use 2 of then with an and The system return zero results which should not be the case

Here my query

Export-EVArchive -archiveid "xxxxx" -SearchString "FROM:x@email or FROM:y@email and hasattachment:yes and date:2013-12-01..2014-01-31  "  -Format EML -outputDirectory c:\temp\test5

I'm pretty sure I make a thinking mistake in the construct of the query but I can't pin point which one

Thank you for any help

Sandrine

2 REPLIES 2

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello Sandrine,

The only thing I could find is the below KB Article. It shows you how to get the searchstring when using an Advanced Search. The notation in this KB article might help a bit, not sure.

https://www.veritas.com/support/en_US/article.100047072

Regards. Gertjan

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello Sandrine,

In this forum entry, David gives his script he uses for export. There is no email selection in it, but he does have the date format there:

$ArchiveList = Get-Content C:\ExportTest\Test.txt
Foreach<$ArchiveID in $ArchiveList> <Export-EUArchive -Archiveid $ArchiveID -OutputDirectory "\\(UNC or local path)\$Archive.pst" -Format PST -MaxThreads 100 -SearchString
"date=<01/06/2007 AND date :>01/01/2007">

The first line reads the Archive IDs from a txt file and then export according to some properties. I hope it helps someone else.

 

Regards. Gertjan