Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Stop Windows Service

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
Fail if service does not exist
true/false
FailIfServiceDoesNotExist

Example:

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