mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
17 lines
383 B
PowerShell
17 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';
|
||
|
|
}
|