icinga-powershell-framework/lib/core/tools/Get-IcingaNextUnitIteration.psm1

21 lines
331 B
PowerShell
Raw Normal View History

2021-05-07 08:38:10 -04:00
function Get-IcingaNextUnitIteration()
{
param (
[string]$Unit = '',
[array]$Units = @()
);
[bool]$Found = $FALSE;
foreach ($entry in $Units) {
if ($Found) {
return $entry;
}
if ($entry -eq $Unit) {
$Found = $TRUE;
}
}
return '';
}