Forum Discussion

CConsult's avatar
CConsult
Moderator
7 years ago

Powershell Export to PST with end date

Hi everyone,

I have a request to scipt a migration to PST.

I cannot find the parameter to set an enddate like in the PST Expot Wizard.

Is there even a parameter for this? Maybe I ve missed something

  • I'm an employee, but I'm just going to tell you that Gertjan's right here. :smileyvery-happy: You can limit the range of the export by using the -SearchString parameter. Just enter a search query that returns the date range you seek. Use the same syntax as you would in EV Search. For instance, to get all the items from June 9, I would write:

    Export-EVArchive -ArchiveId 1DE5EA73FEBC737458C7F38AFD7D8706B1110000evserver1.EV.LOCAL -OutputDirectory c:\temp -Format PST -SearchString 'date:<06/10/2018 AND date:>06/08/2018'
    

    Review the Help page for EV Search if you need a refresher on the syntax.

    Edit: the "smiley embarrassed" in the example above is a : followed by a >. Not sure why a code block would have smileys enabled, but here's a picture of how that final parameter is supposed to look:

     

    --Chris

  • Hello,

    I assume for EV12.3? If you look at the powershell PDf, it seems you can add a search string to the command.

    Specifies a search query with which to identify selected items for export. You can use the same query syntax as you might use to look for specific items in Enterprise Vault Search. For example,
    the search query "to:mike_smith" selects for export only those items for which he was a recipient. Enclose the query in quotation marks if it contains space characters.
    For more information on the query syntax, see the online Help for Enterprise Vault Search

    Export-EVArchive [-ArchiveId] <String> [-OutputDirectory] <String> [[-SearchString] [<String>]]

    That might be an option. I'm not sure on that, but you never know.

    • CConsult's avatar
      CConsult
      Moderator

      Hi Gertjan,

      yes I have noticed that to but did not find informations about it.

      I will try to get to know it. If an Veritas employee could help me out here it would be much appriciated.

      • ChrisLangevin's avatar
        ChrisLangevin
        Level 6

        I'm an employee, but I'm just going to tell you that Gertjan's right here. :smileyvery-happy: You can limit the range of the export by using the -SearchString parameter. Just enter a search query that returns the date range you seek. Use the same syntax as you would in EV Search. For instance, to get all the items from June 9, I would write:

        Export-EVArchive -ArchiveId 1DE5EA73FEBC737458C7F38AFD7D8706B1110000evserver1.EV.LOCAL -OutputDirectory c:\temp -Format PST -SearchString 'date:<06/10/2018 AND date:>06/08/2018'
        

        Review the Help page for EV Search if you need a refresher on the syntax.

        Edit: the "smiley embarrassed" in the example above is a : followed by a >. Not sure why a code block would have smileys enabled, but here's a picture of how that final parameter is supposed to look:

         

        --Chris