Since some legacy Windows services are getting more and more unstable and fall apart without any means of recovery, a kickstarter is needed to ensure those important(?) services don't just disappear quietly without any struggle.
The idea is to use a combination of Powershell script and Task Scheduler to trigger the job every now and then.
PowerShell
Powershell is really easy to pick up. It only requires basic knowledge of Command Prompt, and the rest is just C#.
NOTE: the server name is not required, if the script is to run from the target server directly.
Permission
In order to run the script, you may have to sort out execution policy as well, because the restrictions on some servers. And you will see the following message:
This has everything to do with server execution policy. You can either choose to sign the script, following the tutorial. Alternatively, change your signing policy.
The execution policy details provided by MSDN are:
Instead of using default (which allows you to run nothing), ‘RemoteSigned’ is the level that can satisfy our requirement, and manage not to piss sysadmins off.
Scheduling
The last job is to create the schedule task to make sure the script will check the target service(s). That’s just to follow Task Scheduler Wizard and you will get there eventually.