Last active
April 27, 2024 11:04
-
-
Save ChrisBibby/82f6f933f07ecba3ec0b036d6cc73540 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
Author: Chris Bibby | |
Date: 11-October-2020 | |
Description: Simple powershell script to start/stop the Tobii Eyetracker service. | |
How To Use: Can be run from a shortcut using the Target: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File <insert path to script>\tobii.ps1 | |
#> | |
$service = get-service TobiiIS5LEYETRACKER5 # Name of service to track, can be changed to stop/start any service. | |
if ($service.Status -eq "Stopped") { | |
$service.start(); | |
Write-Host -ForegroundColor Yellow $service.name "is now Running"; | |
} | |
elseIf ($service.status -eq "Running") { | |
$service.Stop(); | |
Write-Host -ForegroundColor Yellow $service.name "is now Stopped"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment