From 932738895a3a995afc4aae70367b2b0bf7335c0b Mon Sep 17 00:00:00 2001 From: Karl-Wilfried Zimmer Date: Thu, 8 Feb 2024 23:28:05 +0100 Subject: [PATCH] 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 --- Extractor.ps1 | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Extractor.ps1 b/Extractor.ps1 index 26cfc14..ad8bc7d 100644 --- a/Extractor.ps1 +++ b/Extractor.ps1 @@ -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