I have service named WinDefend and it runs on process svchost.exe There other many svchost.exe processes and I need to find a way
WinDefend
svchost.exe
$p=Tasklist /svc /fi "SERVICES eq windefend" /fo csv | convertfrom-csv $p.PID