---
title: "Stop Windows Service"
---
Stops an existing Windows service.
Windows::Stop-Service(
Name: <text>,
[WaitForStoppedStatus: <true/false>],
[FailIfServiceDoesNotExist: <true/false>]
);
Name | Format | Script Usage | Usage 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 |
# stops the HDARS service on the remote server
Stop-Service HDARS;