icinga-powershell-framework/lib/daemons/ServiceCheckDaemon/Unregister-IcingaServiceCheck.psm1
2019-10-22 19:57:01 +02:00

16 lines
383 B
PowerShell

function Unregister-IcingaServiceCheck()
{
param(
[string]$ServiceId
);
if ([string]::IsNullOrEmpty($ServiceId)) {
throw 'Please specify a Service Id';
}
$Path = [string]::Format('BackgroundDaemon.RegisteredServices.{0}', $ServiceId);
Remove-IcingaPowerShellConfig -Path $Path;
Write-Host 'Icinga Service Check has been configured';
}