I am looking for a way to kill a windows services using its service name rather than the process name, or PID. The two obvious choices are pskill or taskkill, but I cannot seem to find a way of using either of these methods to kill the service by name.
Is it possible to do it by the service name? If so, is anyone able to provide a quick example?
sc stop <service name> to stop the service.
You can use taskkill to filter by service name and kill the service you're looking for.
taskkill /F /FI "SERVICES eq yourservice"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With