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 {
foreach ($i in (($array.Count-1)..0)){
#Write-Host $array[$i]
if ($array[$i]["state"] -eq 'Started') {
#Write-Host "found started"
$timeStamp = ($array[$i]).ts
}
}
$timeStamp = ($array[$array.Count-1]).ts
$array += New-Object psobject -Property @{
state = $backUpState
ts = $timeStamp