icinga-powershell-framework/lib/core/windows/Restart-IcingaWindowsService.psm1
2021-09-02 09:23:10 +02:00

12 lines
306 B
PowerShell

function Restart-IcingaWindowsService()
{
[string]$JeaPid = Get-IcingaJEAServicePid;
Stop-IcingaService -Service 'icingapowershell';
if ((Test-IcingaJEAServiceRunning -JeaPid $JeaPid)) {
Stop-Process -Id $JeaPid -Force;
}
Restart-IcingaService -Service 'icingapowershell';
}