mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Disabling UseConsistentIndentation because it is not properly working for multi-line commands with arguments and array/hashtable objects
19 lines
602 B
PowerShell
19 lines
602 B
PowerShell
function Get-IcingaRegisteredServiceChecks()
|
|
{
|
|
$Services = Get-IcingaPowerShellConfig -Path 'BackgroundDaemon.RegisteredServices';
|
|
[hashtable]$Output = @{ };
|
|
|
|
foreach ($service in $Services.PSObject.Properties) {
|
|
$Content = @{
|
|
'Id' = $service.Name;
|
|
'CheckCommand' = $service.Value.CheckCommand;
|
|
'Arguments' = $service.Value.Arguments;
|
|
'Interval' = $service.Value.Interval;
|
|
'TimeIndexes' = $service.Value.TimeIndexes;
|
|
};
|
|
|
|
$Output.Add($service.Name, $Content);
|
|
}
|
|
|
|
return $Output;
|
|
}
|