What is the difference between "Start-Process python ex.py" and "python ex.py" in powershell?
<p>I am learning powershell and trying to start a python service using the powershell IDE. I came to know I can start the python services either by one of these commands.</p>

<pre><code>Start-Process python example.py
python example.py 
</code></pre>

<p>Though both of these gives the same result, I am curious to know what is the difference between these two in terms of internal functions and which is better to use?</p>

<p>Both of them are calling python.exe . 
As for the python.exe there is no difference to run .</p>

<p>During python installation , if you selected <strong><em>'add python to PATH'</em></strong> to add path of python.exe into environment variables ,then, you can run python.exe directly in PS .</p>

<p>If you didn't check it , you may need to locate the folder contains python.exe to run  <strong><em>.py</em></strong> file .</p>

<p>In addition , python.exe can be run under other user privilege using 'start-process'  with parameter '-credential' . If you run python.exe in PS console it will inherits user privilege of PS console .</p>

python powershell powershell-v3.0