mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
16 lines
462 B
PowerShell
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;
|
|
}
|
|
}
|