Software - Output Console window

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
angelofstealth
Posts: 67
Joined: Wed Feb 13, 2013 4:26 pm

Software - Output Console window

Post by angelofstealth »

In Sapien PowerShell Studio, writing a powershell script........

Using Write-Host to display a message to the Output doesn't seem to take background color or newline (`r`n). Is there something I need to enable in the options to allow this? Running in PowerShell ISE has no issues. Thanks,

User avatar
angelofstealth
Posts: 67
Joined: Wed Feb 13, 2013 4:26 pm

Re: Software - Output Console window

Post by angelofstealth »

Newline works, color doesn't

Example:
Write-Host "`r`nHey..."-ForegroundColor Green

jvierra
Posts: 14553
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: Software - Output Console window

Post by jvierra »

It works for me with no issue.

The "Output" panel is not a console. Use the "Run" drop down to select "Run in console" and all will work.

User avatar
angelofstealth
Posts: 67
Joined: Wed Feb 13, 2013 4:26 pm

Re: Software - Output Console window

Post by angelofstealth »

Thank you jvierra, I'm all good now.

Locked