I need to monitor three services on a server and automatically start them again if they stop, even when no user is logged in. The services are configured to restart on failure, but that recovery setting does not always seem to work, so they currently have to be restarted manually. Is a scheduled PowerShell script the right approach, or is there a better way to handle this?
4 Answers
Yes, you can run a PowerShell script through Task Scheduler under the SYSTEM account, so nobody needs to be logged in. The script can check a specific list of services and start any that are not running. Make sure the scheduled task uses an account with permission to control services, and avoid restarting every service marked Automatic since some are supposed to stop when idle.
Start by checking the services’ built-in Recovery settings. They can usually be configured to restart after failures, but this only helps when Windows detects an actual failure. A service that exits cleanly, gets stuck while still appearing to run, or handles its own exception incorrectly may not trigger recovery.
A better event-driven setup is to trigger the task from the Service Control Manager event that records a service stopping, then have the script verify the service is still stopped before starting it. This avoids running a check constantly. You may need to filter the event trigger so it only applies to the three services you care about.
A scheduled check is often more reliable than trying to determine whether a service is truly healthy. For flaky legacy services, some administrators schedule a controlled stop and restart during a maintenance window. The right choice depends on whether an outage is acceptable and whether restarting the service could interrupt active work.

A simple check could use Get-Service and only start services from your approved list when their status is not Running. That is safer than scanning every automatic service.