mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Disabling UseConsistentIndentation because it is not properly working for multi-line commands with arguments and array/hashtable objects
22 lines
525 B
PowerShell
22 lines
525 B
PowerShell
function Get-IcingaBackgroundDaemons()
|
|
{
|
|
$Daemons = Get-IcingaPowerShellConfig -Path 'BackgroundDaemon.EnabledDaemons';
|
|
|
|
if ($null -eq $Daemons) {
|
|
return $null;
|
|
}
|
|
|
|
[hashtable]$Output = @{ };
|
|
|
|
foreach ($daemon in $Daemons.PSObject.Properties) {
|
|
$Arguments = @{ };
|
|
|
|
foreach ($argument in $daemon.Value.Arguments.PSObject.Properties) {
|
|
$Arguments.Add($argument.Name, $argument.Value);
|
|
}
|
|
|
|
$Output.Add($daemon.Name, $Arguments);
|
|
}
|
|
|
|
return $Output;
|
|
}
|