This is a follow-up to my earlier question
I have written a script which uses $host.ui.prompt
.
The script runs fine when I run it from my editor (PowerGUI), and the dialog box pops up nicely to prompt the user for input, like this:
.
However, when I run it from a command line (powershell .\script.ps1
), no dialog box pops up: instead, command line prompts appear, like this:
I expected that the script would pop up the nice dialog box for me as before.
What am I missing?