Skip to main content

One post tagged with "service"

View All Tags

A simple powershell script to Start/Stop a Windows service, the example below can be used to Start/Stop the Tobii Eye Tracker service.

# Name of service to track, can be changed to stop/start any service.
$service = get-service TobiiIS5LEYETRACKER5

if ($service.Status -eq "Stopped") {
Write-Host -ForegroundColor Yellow $ "is now Running";
elseIf ($service.status -eq "Running") {
Write-Host -ForegroundColor Yellow $ "is now Stopped";

How to Run:

Create a new shortcut and set the target as follows:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File <insert path to script>\start-stop-tobii.ps1