cancel
Showing results for 
Search instead for 
Did you mean: 

PST export using powershell

DavidAlvarez
Level 4

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

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

9 REPLIES 9

Prone2Typos
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

DavidAlvarez
Level 4

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
Moderator
Moderator
Partner    VIP    Accredited Certified

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.

 

 

Regards. Gertjan

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

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi David,

I am not an Powershell expert, but it should be possible to use something like the below:

Get-EVarchive -ImportFile c:\temp\file.csv

 

 

Regards. Gertjan

Hi Gertjan,

According to the documentation this switch doesn't exist:

https://www.veritas.com/content/support/en_US/doc/96069939-120347322-0/v96111450-120347322?profileUR...

Kind Regards,

David

GertjanA
Moderator
Moderator
Partner    VIP    Accredited Certified

Hello David,

it is a powershell switch, which allows you to import a file. If you happen to know someone with Powershell knowledge, he/she probably can assist. Althought the GET-EVArchive is EV specific, the format is powershell. That means it should be possible to use 'standard' powershell commands to (as example) execute a command and feed it a list of values from a file.

Regards. Gertjan

Prone2Typos
Moderator
Moderator
Partner    VIP    Accredited Certified

Hey David.

It is atypical for a PS module like this to directly support importing of a CSV beause of the lego like nature of Powershell. You will need to do something like this, and it should work but it is not quite as simple as you are thinking.. The good news is this is pretty standard in all PS and you will level up your PS chops after you run through a realitively simple test.

Hope this helps.

 

J

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.