Added support to remove registered service checks

This commit is contained in:
Lord Hepipud 2019-10-05 22:06:10 +02:00
parent 67dcdf94fe
commit 0c124a49e4

View file

@ -0,0 +1,16 @@
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';
}