icinga-powershell-framework/lib/icinga/plugin/Write-IcingaPluginOutput.psm1
2022-08-24 16:26:27 +02:00

16 lines
462 B
PowerShell

function Write-IcingaPluginOutput()
{
param (
$Output
);
if ($Global:Icinga.Protected.RunAsDaemon -eq $FALSE -And $Global:Icinga.Protected.JEAContext -eq $FALSE) {
if ($Global:Icinga.Protected.Minimal) {
Clear-Host;
}
Write-IcingaConsolePlain $Output;
} else {
# New behavior with local thread separated results
[array]$Global:Icinga.Private.Scheduler.CheckResults += $Output;
}
}