title: Powershell: A positional parameter cannot be found that accepts argument “test”
body: <p>I'm trying to execute the following command via command line</p>
  <pre><code>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe  Send-MailMessage -from &quot;mail.me&quot; -to &quot;mail.me&quot; -Subject &quot;PS test !&quot; -Body &quot;Hi this is a power shell mail test&quot; -SmtpServer &quot;mail.domain.com&quot;
  </code></pre>
  <p>But I'm getting the following error :</p>
  <blockquote>
  <p>Send-MailMessage: A positional parameter cannot be found that accepts argument  « test ».<br />
  Au niveau de ligne : 1 Caractère : 17</p>
  <ul>
  <li>Send-MailMessage &lt;&lt;&lt;&lt;  -from mail.me -to mail.me -Subject PS test ! -Body Hi this is a power shell mail test -SmtpServer mail.domain.com</li>
  <li>CategoryInfo          : InvalidArgument: (:) [Send-MailMessage], ParameterBindingException</li>
  <li>FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell<br />
  .Commands.SendMailMessage</li>
  </ul>
  </blockquote>
  <p>The problem is that the same command works well when directly executed in Power Shell, but without the path.</p>
  <p>What could be the problem generating this exception ?</p>