|Can someone confirm if stop or taskkill from a batch file will be able to stop/kill a service that is hung in a state of "starting"? I need to stop services across multiple servers in a particular order and then restart those same services in the reverse order.|
Stop service2 on server2
stop service1 on server2
stop service2 on server1
stop service1 on server1
start service1 on server1
start service2 on server1
start service1 on server2
start service2 on server2
My issue is that if a service gets hung in a state of "starting" the batch does not go on to the next step. I suspect I can simply kill the hung process and then attempt to start it again to see if that fixes the issue and allows the batch to complete.
I realize this is treating the symptom and not the issue, but I do not know of a way to replicate a hung service to determine what the root problem is.
I'm running Windows 2003 on some servers and Windows 2008 on the other servers.
Any help would be greatly appreciated.