Apologies if this is simple however I'm having real difficulty extracting the maximum value for a given range in Powershell Tools.
My script uses:
$max2WeeksAgo = (Get-PIExpressionSummary -Times $times -Intervals 1 -SummaryType Maximum -Basis EventWeighted -Expression "'$tag'" -Connection $myPi).VALUES
Where $times = @("$searchStart","$searchEnd")
PS H:\> $times
It returns with "Maximum [-11057] Not Enough Values For Calculation(0% Good data)"
Can anyone please advise?