removed search for last started as started might also be malformed and consecutive fails are skipped already. will now always take the last known timestamp

This commit is contained in:
Karl-Wilfried Zimmer 2024-02-08 23:28:05 +01:00
parent d9eb681007
commit 932738895a

View File

@ -65,13 +65,7 @@ function ProduceHashMap {
} }
} }
catch { catch {
foreach ($i in (($array.Count-1)..0)){ $timeStamp = ($array[$array.Count-1]).ts
#Write-Host $array[$i]
if ($array[$i]["state"] -eq 'Started') {
#Write-Host "found started"
$timeStamp = ($array[$i]).ts
}
}
$array += New-Object psobject -Property @{ $array += New-Object psobject -Property @{
state = $backUpState state = $backUpState
ts = $timeStamp ts = $timeStamp