ID de proceso de inicio PowerShell
$app = Start-Process notepad -passthru
Wait-Process $app.Id
Famous Flatworm
$app = Start-Process notepad -passthru
Wait-Process $app.Id
# Starts Notepad and returns the ID
(Start-Process Notepad -passthru).ID