icinga-powershell-framework/lib/core/windows/Restart-IcingaWindowsService.psm1

13 lines
306 B
PowerShell
Raw Normal View History

2021-08-06 12:12:27 -04:00
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';
}