Windows - Services

windows - done reading

How can we display a list of running services from the command prompt?

net start
sc query

How can we stop a service from the command prompt?

net stop "Windows Time"
sc stop "Windows Time"

How can we start a service?

net start "Windows Time"
sc start "Windows Time"

How can we kill a service that are stuck in starting / stopping?

sc queryex "wlsvc qdomain_myserver"
taskkill /f /pid [PID]

How can we manually create a service?

sc create service_name binpath=C:\path\to\binary [option1] [option2] [optionN]
sc create service_name binPath="C:\Aspera\bin\asperacentral.exe" DisplayName="Aspera Central" start=auto
  1. download and unzip
  2. from command line type: nssm.exe install [servicename]
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License