mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 15:19:58 -05:00
13 lines
372 B
PowerShell
13 lines
372 B
PowerShell
|
|
function Show-IcingaAgentObjects()
|
||
|
|
{
|
||
|
|
$Binary = Get-IcingaAgentBinary;
|
||
|
|
$Output = Start-IcingaProcess -Executable $Binary -Arguments 'object list';
|
||
|
|
|
||
|
|
if ($Output.ExitCode -ne 0) {
|
||
|
|
Write-Host ([string]::Format('Failed to fetch Icinga Agent objects list: {0}{1}', $Output.Message, $Output.Error));
|
||
|
|
return $null;
|
||
|
|
}
|
||
|
|
|
||
|
|
return $Output.Message;
|
||
|
|
}
|