D
D
Danil2016-05-16 11:51:32
cmd/bat
Danil, 2016-05-16 11:51:32

How to get the PID of a service process through the console?

I open the task manager in the services tab, I can select a service and see its process. And how to find it through the console? For example, I need to kill the process of a particular service.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-05-16
@Veneomin

PowerShell to use.

Get-Process - выведет список текущих процессов.
| - конвейер
$_ - переданное по конвееру значение
.id - параметр значения
where - условие 
Stop-Process - остановить процесс

R
res2001, 2016-05-16
@res2001

Using the sc utility, you can perform any manipulations with services, including starting, stopping, etc.
sc stop <service name>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question