// powershell.exe
// -ExecutionPolicy Bypass c:\scripts\serviceCheck.ps1
$serviceName = '[input-service-name-here]'
$arrService = Get-Service -Name $serviceName
while ($arrService.Status -ne 'Running')
{
Start-Service $serviceName
$arrService.Refresh()
}