Skip navigation
All Places > All Things PI - Ask, Discuss, Connect > Ideas

Powershell PIArchive.Reprocess

score 10
You have not voted Submitted
Originally posted on UserVoice

A powershell method for reprocessing PI Archve Files.

$myPIArchive = Get-PIArchiveFileInfo -Connection $myPi -Name "someArchiveFile"

$myPIArchive.ReprocessArchive -NewFileName $false|"filename" -Type Dynamic|Fixed -OtherCoolOptions

Reading data from a reprocessed archive is significantly faster, so I am adding this as a maintenance-task currently using
cmd /c "%PISERVER%\bin\piarcss.exe -if old -of new"
(For some reason start-process didn't work for me)

I would also love a $myPIArchive.LastReprocessedTime for housekeeping. I am currently storing that in a separate hashtable.