icinga-powershell-framework/lib/core/thread/Get-IcingaThreadPool.psm1
2022-01-25 10:00:19 +01:00

14 lines
324 B
PowerShell

function Get-IcingaThreadPool()
{
param (
[string]$Name
);
if ($Global:Icinga.Public.ThreadPools.ContainsKey($Name)) {
return $Global:Icinga.Public.ThreadPools[$Name];
}
Write-IcingaEventMessage -Namespace 'Framework' -EventId 1401 -Objects $Name;
return (New-IcingaThreadPool);
}