AnsweredAssumed Answered

Need help with PI Powershell function Get-PIExpressionSummary

Question asked by K@8983 on Dec 4, 2015
Latest reply on Dec 11, 2015 by pthivierge

Need help with PI Powershell function Get-PIExpressionSummary:

 

I have a requirement to get record count for multiple tags for multiple time period.

 

I am getting results for Get-PIExpressionSummary but unable to get only Tag, Timestamp, value formats.

 

I am trying to assign result to different  variable but it's not working.

$Result = Get-PIExpressionSummary -Connection $pidataarchive -Times $times -SummaryType Count -Basis EventWeighted -Expression "'sinusoid'" -Intervals 1 | Format-List

 

$Tm = $Results.Value.Values[0] for StartTime

$Cnt = $Results.Value.Values[2] for Count

 

But it gives me error.

 

Cannot index into a null array

 

CategoryInfo : Invalid Operation: (:) [], RuntimeException

FulllyQualifiedErrorID : NullArray

 

Any help would be appreciated.

Outcomes