Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.