powershell command start-process code example
Example 1: start-process id powershell
$app = Start-Process notepad -passthru
Wait-Process $app.Id
Example 2: start-process id powershell
# Starts Notepad and returns the ID
(Start-Process Notepad -passthru).ID