added function to print all vm names that intersect with point
This commit is contained in:
parent
84e409c096
commit
545d790a8b
@ -135,4 +135,16 @@ 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)"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user