added function to print all vm names that intersect with point

This commit is contained in:
Karl-Wilfried Zimmer 2024-02-09 00:01:51 +01:00
parent 84e409c096
commit 545d790a8b

View File

@ -136,3 +136,15 @@ function buildIntervals {
} }
return $array 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)"
}
}
}