diff --git a/Extractor.ps1 b/Extractor.ps1 index 1650a4c..f16044a 100644 --- a/Extractor.ps1 +++ b/Extractor.ps1 @@ -135,4 +135,16 @@ function buildIntervals { } } return $array +} + +function PrintAffected { + param ( + $listOfIntervals, + [datetime]$point + ) + foreach ($elem in $listOfIntervals){ + if ($point -le $elem.ending -and $point -ge $elem.begining){ + Write-Host "$point : $($elem.vm) $($elem.state)" + } + } } \ No newline at end of file