Next Topic

Previous Topic

Book Contents

stopWindowsService()

Runs a Stop command for a Windows service if it exists. See startWindowsService(), disableWindowsService() and windowsServiceRecoverySettings().

Note: Be sure to use the service name of the service, not the display name of the service. For example, the display name of the service for Microsoft SQL Server is SQL Server (MSSQLSERVER), but the service name of the service is MSSQLSERVER. For Windows machines, right click any service in the Services window and click the Properties option to see the service name of that service.

Operating systems supported: Windows

Example

stopWindowsService("btwdins", "All Operating Systems", "Halt on Fail")