Opening two webservers via one ps1 script
<p>I've tried running the following, via PowerShell, in a single ps1 script in the hope of two localservers opening on different ports - only 8080 is opened:</p>

<pre><code>cd "\\blah\Statistics\Reporting\D3\walkthroughs\letsMakeABarChart" 
python -m http.server 8080

cd "\\foo\data_science\20161002a_d3js\examples" 
python -m http.server 8000 
</code></pre>

<p>Can I adjust it so both get opened?</p>

<p>The first python invoke probably <em>doesn't return</em> so you could use the <code>Start-Job</code> cmdlet:</p>

<pre><code>$job1 = start-job -scriptblock {
    cd "\\blah\Statistics\Reporting\D3\walkthroughs\letsMakeABarChart" 
    python -m http.server 8080    
}

$job2 = start-job -scriptblock { 
    cd "\\foo\data_science\20161002a_d3js\examples" 
    python -m http.server 8000 
} 

# Wait until both web servers terminates:
Wait-Job -Job ($job1, $job2)
</code></pre>

python powershell