Add smart service interaction functions

This commit is contained in:
Lord Hepipud 2019-10-31 14:32:19 +01:00
parent ba1dc01c58
commit 071a26cc62
3 changed files with 30 additions and 0 deletions

View file

@ -0,0 +1,10 @@
function Restart-IcingaService()
{
param(
$Service
);
if (Get-Service $Service -ErrorAction SilentlyContinue) {
Restart-Service $Service;
}
}

View file

@ -0,0 +1,10 @@
function Start-IcingaService()
{
param(
$Service
);
if (Get-Service $Service -ErrorAction SilentlyContinue) {
Start-Service $Service;
}
}

View file

@ -0,0 +1,10 @@
function Stop-IcingaService()
{
param(
$Service
);
if (Get-Service $Service -ErrorAction SilentlyContinue) {
Stop-Service $Service;
}
}