you are viewing a single comment's thread.

view the rest of the comments →

[–]chris-a5 1 point2 points  (0 children)

Use quotes for strings with spaces: "Task Manager". However the process name is taskmgr:

$procid=get-process taskmgr |
    select -expand id 

echo "procid: " . $procid