title: wmic process - capture in variable
body: <p>I want to capture the processID in a variable but I get an error, thanks ...</p>
  
  <pre><code>wmic process where name="notepad.exe" get ProcessId
  
  ProcessID
  
  7948
  
  for /f %%a IN ('wmic process where name="notepad.exe" get ProcessId') do set "MYVAL=%%a"
  echo %MYVAL%
  
  notepad.exe - Invalid alias verb
  </code></pre>