Sunday, December 1, 2019

Windows server command line, kill and restart the service

Below are the commands can be used to check the hang service, you can force kill the service and restart:
1. To check the service status
a) Open command line(as administrator), telnet the service with the port as below:
telnet server_ip port
Example: telnet 10.10.10.10 9000
if telnet is failed, go to step b to kill the service:
b) sc queryex "service_name"
Example: sc queryex myservice
Note the PID and run below command to kill the service
c) taskkill /f /pid PID
Example: taskkill /f /pid 1234
To start the service from command line
d) sc start service_name
Example:  sc start myservice

No comments:

Post a Comment

Set up gmail in outlook using app password

You might receive an error saying, "unable to connect to your outgoing server" while setting up a gmail account in outlook even wh...