Sc failure Command in Windows server 2008

In this article I am going to explain about sc failure command in windows server 2008 operating system.
  • 3189


The operating system Sc failure command is used to specifies one or more than one actions to take if a service fails.

Syntax of Sc failure

sc [<ServerName>] failure [<ServiceName>] [reset= <ErrorFreePeriod>] [reboot= <BroadcastMessage>] [command= <CommandLine>] [actions= {"" | {[run/<MS>] | [restart/<MS>] | [reboot/<MS>]}[/...]]

Parameters in Sc failure command

It contains following parameter, which is given below:
Parameter Description
<ServerName> It specifies the name of the remote server on which service is located.
<ServiceName> It specifies the service name.
reset= <ErrorFreePeriod> It specifies length of period (in seconds) with no failures after which the failure.
reboot= <BroadcastMessage> It specifies the message to be broad cast when a service fails.
command= <CommandLine> It specifies the command-line command to be run when the specified service fails.
actions= {"" | {[run/<MS>] | [restart/<MS>] | [reboot/<MS>]}[/...]] It specifies one or more failure actions and their delay times (in milliseconds) .

Example of Sc failure command

sc failure EFS reset= 20 actions= restart/3000


More Articles

© 2020 DotNetHeaven. All rights reserved.