Let's say I start a powershell process like this:
$procid = start-process -FilePath powershell _
-ArgumentList ping, -t, localhost
How can I get the Process-Id of "ping" given only the process-id of powershell, ie. $procid?
Because, I only have $procid in a script, and need to find procid of child processes.
Here you can see that powershell has pid 3328, and I need to use 3328 to query powershell to find the id: 7236 (Ping.exe).