Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ChrisBibby/82f6f933f07ecba3ec0b036d6cc73540 to your computer and use it in GitHub Desktop.
Save ChrisBibby/82f6f933f07ecba3ec0b036d6cc73540 to your computer and use it in GitHub Desktop.
<#
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