<p>Prerequis :</p>
<ul>
<li>
<p>You need to be able to run PowerShell as an administrator</p>
</li>
<li>
<p>You need to set your PowerShell execution policy to a permissive value or be able to bypass it</p>
</li>
</ul>
<p>Etapes :</p>
<ul>
<li></li>
</ul>
<p>Launch Windows PowerShell as an Administrator, and wait for the <code>PS></code> prompt to appear</p>
<ul>
<li></li>
</ul>
<p>Navigate within PowerShell to the directory where the script lives:</p>
<pre><code class="lang-auto">PS> cd C:\my_path\yada_yada\ (enter)
</code></pre>
<ul>
<li></li>
</ul>
<p>Execute the script:</p>
<pre><code class="lang-auto">PS> .\run_import_script.ps1 (enter)
</code></pre>
<p>Or: you can run the PowerShell script from the Command Prompt (<code>cmd.exe</code>) like this:</p>
<pre><code class="lang-auto">powershell -noexit "& ""C:\my_path\yada_yada\run_import_script.ps1""" (enter)
</code></pre>
<p>according to <a href="http://poshoholic.com/2007/09/27/invoking-a-powershell-script-from-cmdexe-or-start-run/"><em>Invoking a PowerShell script from cmd.exe (or Start | Run)</em></a> by Kirk Munro.</p>
<p>Or you could even <a href="http://www.codeproject.com/KB/threads/AsyncPowerShell.aspx">run your PowerShell script asynchronously from your C# application</a>.</p>