mhouston100
mhouston100

Reputation: 1203

Force console output in ISE?

Is there a way to force the ISE to output to the console, rather than use the Windows forms?

For example with:

$host.ui.PromptForChoice($title, $message, $options, 0)

When run in the ISE you get the nice form version. What if I want to just display it in the console, the way it will be running when I save it and 'Run with Powershell'?

Just want to be able to test how things look without having to leave the ISE.

Upvotes: 2

Views: 615

Answers (1)

Keith Hill
Keith Hill

Reputation: 201622

You can use [console]::writeline("testing") to output text to the ISE console tool window. But the [console]::read* methods don't really work. Other than that, you are at the mercy of how the host implements the PSHostUserInterface interface - http://msdn.microsoft.com/en-us/library/system.management.automation.host.pshostuserinterface_members(v=vs.85).aspx

Upvotes: 1

Related Questions