title: How to use STA mode in PowerShell 1.0?
body: <p>I'm very awkward in PowerShell and I use it only at home for my own simple tasks under my Windows XP where no available upgrade to PS2. Next test show that my PowerShell 1.0 use MTA mode by default.</p>
  
  <pre><code>[threading.thread]::CurrentThread.GetApartmentState()
  </code></pre>
  
  <p>And such call like...</p>
  
  <pre><code>PowerShell.exe –STA c:\scripts\file.ps1
  </code></pre>
  
  <p>...always fail with error:</p>
  
  <blockquote>
    <p>Missing expression after unary operator '-'. At line:1 char:2
    + -S &lt;&lt;&lt;&lt; TA c:\scripts\file.ps1</p>
  </blockquote>
  
  <p>Looks like my PS1 not recognize –STA switch. What I do wrong? Is there any way at all to run my script in STA mode in PS1?</p>