Stop Windows Service
  • 14 May 2021
  • 1 Minute to read
  • Dark
    Light
  • PDF

Stop Windows Service

  • Dark
    Light
  • PDF

Article Summary

This is generated from the built in components of BuildMaster 7.0.0, and may be different than what you have installed (especially if you have extensions); go to [User Icon] -> Documentation within your BuildMaster instance to see exactly what operations are available.

Stop Windows Service

Stops an existing Windows service.

Script usage:

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

This operation may be prefixed with Windows::, although this is a built-in namespace and isn't really necessary.

Arguments:

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

Example:

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

Was this article helpful?

What's Next