Manage Windows Services using Command Prompt
I think the reason people would need this is because:
- They want to write a script that monitors or manages certain services;
- They need to login through Remote PowerShell or an SSH Server to manage the service.
Here are some quick tips for managing windows service using the command prompt:
List the status of all services.
sc query type= service | more
Filter the list of services using service name and wildcards. In the example below ‘intel%’ is the service name that we are searching for and ‘%’ is the wildcard character.
wmic service where "name like 'intel%'" list status
Query the configuration of a service.
sc qc [servicename]
Configure the service to start automatically.
sc config [servicename] start= auto
Disable the service.
sc config [servicename] start= disabled
Manually start the service.
net start [servicename]
Manually stop the service.
net stop [servicename]
References:
Read other posts
comments powered by Disqus