Forum Discussion

DavidAlvarez's avatar
5 years ago

PST export using powershell

I've been asked to perform a PST export of all the archives to PST.

There is a shell command called Export-EVArchive is there a way to bulk export all the archives using this command? Is there a way to execute it reading the users from a CSV and piping Export-EVArchive and Get-EVArchive?

It will be quicker than executing the export PST wizard?

Thanks in advance.

David

  • Sorry for the necromancy, but I wanted to post the script I finally used and I forgot until now:

    $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.

  • I think it should be about the same export speed, be pipable to, and accomplish what you are seeking.... but I would not want to do it if you had a lot of archives to export.

  • Thanks for your answer, I'm interested in the CSV part specially. Can I import a csv with names or addresses and pipe it to export the archives to PST from shell?

    • GertjanA's avatar
      GertjanA
      Moderator

      Hello David,

      Check the Powershell.pdf in the documentation folder. There is an option to use a Get-EVArchive, which allows usage of several options to get the archiveid. You use the archiveid in Export-EVArchive

      I am not a Powershell savy person, but I assume you can do what you ask, feed csv to get-evarchive, pipe that to get-evarchive.

       

       

      • DavidAlvarez's avatar
        DavidAlvarez
        Level 4

        Hi Gertjan,

         

        Thanks for your answer. I already checked the online documentation that is the same that the PDF one, an I can't see any reference to import a csv. The input information that Get-EVArchive accepts is user/mails/archive names but I don't see the option to import the information from a csv.

        Kind Regards,

        David