วิธีหา Process Id (PID) ของ Windows Service ด้วย PowerShell

wk
1 min readDec 19, 2019

--

ตัวอย่าง

ต้องการห้า PID ของ Service BCircle.ServiceScheduler.exe

  1. เปิด PowerShell
  2. พิมพ์คำสั่ง
Get-WmiObject `
-Class Win32_Service `
-Filter "Name LIKE 'BCircle.ServiceScheduler.exe'" `
| Select-Object -ExpandProperty ProcessId

จะได้ PID คือ 8008

ถ้าต้องการดูรายละเอียดของ Process สามารถใช้คำสั่ง Get-Process โดย Filter ด้วย Id

Get-Process -Id 8008

--

--

No responses yet