Force Stop Windows Service After Loss of Network Connectivity
Posted on 2013-02-05
I need a process/script to stop a windows service after loss of network connectivity. For example I have a service running called "myservice"
1.) "myservice" is running as an AD user using "logon as a service" local security rights.
2.) "Myservice" is set to manual startup
2.) Network cable is unplugged from machine where "myservice" had authenticated and started successfully
3.) after a specified amount of time with loss of connectivity, lets say 5 minutes, I need "myservice" to be stopped
Ultimate goal would be a method to ping a specified public IP address and upon loss of response for 5 minutes, "myservice" gets killed/stopped