Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

It appears that sc.exe isn't capable of setting the 'restart service after' parameter and powershell isn't capable of setting up service restarts at all.

My intended configuration is failure1/restart failure2/restart failure3/nothing with a five minute counter between each restart. The five minute timer is extremely important.

Is there anything else I can look at other than some registry hackery configure this?

share|improve this question
up vote 1 down vote accepted

The failure response is stored in the REG_BINARY value FailureActions under HKLM\SYSTEM\CurrentControlSet\services\<SERVICE_NAME>. You'll probably have to set it the way you want it on one machine using services.msc, grab the data from the FailureActions value in the Registry, and then script the configuration with reg add (or reg import if using a .REG file).

share|improve this answer
Good answer. That is about what I did, with the exception of creating a script that lets me do this to arbitrary combinations of hosts and services. – Tim Brigham Sep 24 '12 at 18:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.