Good afternoon, and thanks in advance for any assistance. I created the below powershell script in order to pull a 1minute average of a PI tag (the script is run every minute by windows task scheduler), and push it across an API. It seems to be working properly in that the start and end times update properly when it runs every minute, but I've noticed that the value seems to only change every 15 minutes or so. The value of the pi tag is constantly changing, typically having about 10 samples per minute, so I would expect the Get-PIExpressionSummary result should be changing as well. The image below shows the results from the powershell script, along with a PICalc Average in excel of the same tag at 1m time intervals. Why don't both methods yield the same result.?

#Connection to PI Server
$piServerName = "Server"
$piConnection = Connect-PIDataArchive -PIDataArchiveMachineName $piServerName -AuthenticationMethod Windows
$piPoint = "point"
#Get point attributes like Name, Pointtype etc..
$pt = Get-PIPoint -Name $piPoint -Connection $piConnection -AllAttributes
#Define Time Range
$startTime = ConvertFrom-AFRelativeTime -RelativeTime "*-1m" -LocalTime
$endTime = ConvertFrom-AFRelativeTime -RelativeTime "*" -LocalTime
$Times = @( $startTime.ToUniversalTime() , $endTime.ToUniversalTime() )
#Calculate point average over time range
$results = Get-PIExpressionSummary -Times $Times -Intervals 1 -SummaryType Average -Basis TimeWeighted -Expression "'point'" -Connection $piConnection
#Ensure the result is not empty
if ($results -ne $null){
$rtimeStamp = $results.EndTime
$rtimeStamp = $rtimeStamp.ToString("yyyy-MM-dd" + "T" + "HH" + ":" + "mm" + ":" + "ss" + "+00:00")
$rvalue = $results.Values['Average'].Value
##PUSH VALUES TO API##
}