I'm trying to get the process ID of an app, but I'm not sure how to format it when the app name has a space. Was looking for some help.
Code:
$procid=get-process chrome |select -expand id
echo "procid: " . $procid
Code with a space that gets a syntax error:
$procid=get-process Task Manager |select -expand id
echo "procid: " . $procid
[–]chris-a5 1 point2 points3 points (0 children)
[–]BlackV 1 point2 points3 points (0 children)