icinga-powershell-framework/lib/icinga/plugin/Write-IcingaPluginOutput.psm1

17 lines
462 B
PowerShell
Raw Normal View History

function Write-IcingaPluginOutput()
{
param (
$Output
);
2021-12-09 11:42:06 -05:00
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;
}
}