--- title: "Stop Windows Service" ---
This is generated from the built in components of BuildMaster 2024.0, and may be different than what you have installed (especially if you have extensions); go to [Gear Icon] -> Administration -> Operations within your BuildMaster instance to see exactly what operations are available.

Stops an existing Windows service.

Script usage:

Windows::Stop-Service(
	Name: <text>,
	[WaitForStoppedStatus: <true/false>],
	[FailIfServiceDoesNotExist: <true/false>]
);

Arguments:

NameFormatScript UsageUsage Notes
Service name (default)
text
Name
This argument is required.
Wait for stopped status
true/false
WaitForStoppedStatus
Default value is "True".
Fail if service does not exist
true/false
FailIfServiceDoesNotExist
Default value is "True".

Example:

# stops the HDARS service on the remote server
Stop-Service HDARS;