title: Powershell host.ui.prompt doesn't pop up a dialog box when run from the command line
body: <p>This is a follow-up to my <a href="https://stackoverflow.com/questions/8184167/powershell-user-input-what-type-does-host-ui-prompt-return">earlier question</a></p>
  
  <p>I have written a script which uses <code>$host.ui.prompt</code>.<br>
  The script runs fine when I run it from my editor (<a href="http://powergui.org" rel="nofollow noreferrer">PowerGUI</a>), and the dialog box pops up nicely to prompt the user for input, like this:  </p>
  
  <p><img src="https://i.stack.imgur.com/Ajxtq.gif" alt="dialog box appears as expected">.  </p>
  
  <p>However, when I run it from a command line (<code>powershell .\script.ps1</code>), no dialog box pops up: instead, command line prompts appear, like this:  </p>
  
  <p><img src="https://i.stack.imgur.com/yIuM4.gif" alt="DOS box text prompts"></p>
  
  <p>I expected that the script would pop up the nice dialog box for me as before.  </p>
  
  <p><strong>What am I missing?</strong>  </p>