diff --git a/Tools.ps1 b/Tools.ps1 index c8d5f94..c870da7 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -318,7 +318,7 @@ Function Control-Service $StopCmd = $ArgString -replace ' -Restart ', ' -Stop ' $StartCmd = $ArgString -replace ' -Restart ', ' -Start ' Invoke-Expression $StopCmd - Start-Sleep -Seconds 10 + #Start-Sleep -Seconds 10 Invoke-Expression $StartCmd Exit } @@ -350,11 +350,11 @@ Function Control-Service LogMsg " ${verbing} ${displayname}" Switch ( $verb) { 'start' { - Try { Start-Service -Name $svc } + Try { Start-Service -Name $name } Catch { LogErr $_.Exception.Message } } 'stop' { - Try { Stop-Service -Name $svc -Force } + Try { Stop-Service -Name $name -Force } Catch { LogErr $_.Exception.Message } } }