Powershell Output in Output Window

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

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
flipperdink
Posts: 3
Joined: Fri Dec 08, 2006 8:04 am

Powershell Output in Output Window

Post by flipperdink »

I love the new Output Pane. It works great for VBScript. Is there anyway to get Powershell to send output to it as well. Right now, when I run a PS script it runs in the PS Console window

User avatar
jhicks
Posts: 1789
Joined: Sun Jan 21, 2007 11:31 pm

Powershell Output in Output Window

Post by jhicks »

This is because of the way PowerShell handles console output. I know Alex would like to find a way to do this, but I believe he's battling some PowerShell limitations.

User avatar
flipperdink
Posts: 3
Joined: Fri Dec 08, 2006 8:04 am

Powershell Output in Output Window

Post by flipperdink »

Thanks for info. That's sort of what I figured.

User avatar
donj
Posts: 416
Joined: Thu Nov 16, 2006 9:02 pm

Powershell Output in Output Window

Post by donj »

Build 4.1.532 gives you the option of capturing PowerShell output to the Output tab/pane, if desired. Write-Debug is captured to the Debug tab (seperately from the main output of your script). Sorry this took a bit; the way you have to do this in PowerShell is 100% different from the way you'd do it with most script processors; ratehr than just grabbing stdout you actually have to host PowerShell itself which is a whole programming project. But, it's in there now and build 532 is a free release for owners of 4.1.

User avatar
flipperdink
Posts: 3
Joined: Fri Dec 08, 2006 8:04 am

Powershell Output in Output Window

Post by flipperdink »

Thanks ! I saw the blog this morning and downloaded the new release. Very cool. You guys rock !

Locked