Posted On March 31, 2019

Quick and Dirty Script to Watch and Start / Restart Windows Service

kimconnect 0 comments
blog.KimConnect.com >> Windows >> Quick and Dirty Script to Watch and Start / Restart Windows Service
// 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()
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Some Stories in the Backlog

1. Upgrade pods with 32" monitors - Make collaboration easier - Increase productivity   2.…

G729 Codec

cd /usr/lib/asterisk/moduleswget http://asterisk.hosting.lv/mv codec_g729-ast110-gcc4-glibc-x86_64-core2.so codec_g729.sochmod 755 codec_g729.soamportal restartasterisk -rx "core show codecs"Download these two files:1.…

Some Batch Files

REM Date.batset fscfg=m:\mfgsys\fs.cfgm:\fs_apps\setcfg N0 DT_TODAY={TODAY} REM lexp.batfsguiapp.exe -s -cm:\mfgsys\fs.cfg -iAAA{TAB}y2k99{CR}bexe{ESC}exp{CR}exit Rem Invoice_Prints_ZZ1_2_3_.batfsguiapp.exe -cm:\mfgsys\fs.cfg -iZZ1{TAB}pass1{CR}bexe{ESC}zz1{CR}M:\cabsauto\timeout 15fsguiapp.exe…