Restart a service.
Namespace: Bespoke.CommonAssembly: Bespoke.Common (in Bespoke.Common.dll) Version: 5.0.0.0 (5.0.0.0)
Public Shared Function RestartService ( _
serviceName As String, _
timeoutMilliseconds As Integer _
) As Boolean
Public Shared Function RestartService ( _
serviceName As String, _
timeoutMilliseconds As Integer _
) As Boolean
public static bool RestartService(
string serviceName,
int timeoutMilliseconds
)
public static bool RestartService(
string serviceName,
int timeoutMilliseconds
)
public:
static bool RestartService(
String^ serviceName,
int timeoutMilliseconds
)
public:
static bool RestartService(
String^ serviceName,
int timeoutMilliseconds
)
Parameters
- serviceName
- Type: System String
The name of the service to restart.
- timeoutMilliseconds
- Type: System Int32
The amount of time to wait for the service to restart, before giving up.
Return Value
true if the service was successfully restarted; otherwise, false.