Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Force stop a service in Windows

Leer en espanol
Force stop a service in Windows

Table of contents

I started to investigate how to do it forcefully and this is what I found in ===
Today I had the problem that a service had stopped for some reason...
I started researching how to do it forcefully and this is what I found in two simple steps:
text
sc queryex <servicename>
Example:
text
ERVICE_NAME: ServicioCTS

TYPE               : 110  WIN32_OWN_PROCESS  (interactive)

STATE              : 3  STOP_PENDING

(STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN))

WIN32_EXIT_CODE    : 0  (0x0)

SERVICE_EXIT_CODE  : 0  (0x0)

CHECKPOINT         : 0x3

WAIT_HINT          : 0x0

PID                : 4432

FLAGS              :
Now with the PID obtained... well we kill it
Syntax:
text
taskkill /F /PID <PID>
Example:
text
taskkill /F /PID 4432
Ready, now let's go services.msc or we execute net start it should boot up correctly.
text
net start ServicioCTS
Greetings, rokitoh.
:wq!

Comments