21

In windows Tasklist is the command but how list the Running process and their child process in windows 7

user1699309
  • 253
  • 2
  • 4
  • 9

1 Answers1

30

You can get a list of processes with the PID and parent PID using:

wmic process get Caption,ParentProcessId,ProcessId

Given a parent PID you can list the immediate children with something like:

wmic process where (ParentProcessId=2480) get Caption,ProcessId
wjandrea
  • 28,235
  • 9
  • 60
  • 81
arx
  • 16,686
  • 2
  • 44
  • 61
  • 2
    Example has incorrect where clause formatting. It actually shall be with parenthesis `wmic process where ("ParentProcessId=2480") get Caption,ProcessId` – myszon Jun 16 '20 at 14:12