
In Windows service, you found that there’s a service stuck with status “Starting” or “Stopping”.

Solution
Execute below command to find the PID of the service name.
sc queryex [SERVICE-NAME]
### Example ###
sc queryex ITSITI
Capture the PID.
SERVICE_NAME: ITSITI
TYPE : 10 WIN32_OWN_PROCESS
STATE : 2 START_PENDING
(STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
PID : 1632
FLAGS :
Kill the PID.
taskkill /f /pid 1632
SUCCESS: The process with PID 1632 has been terminated.
You can try to restart the Windows service again.