mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
21 lines
331 B
PowerShell
21 lines
331 B
PowerShell
|
|
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 '';
|
||
|
|
}
|