Powershell Script - No Output

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 SUBSCRIPTION NUMBERS, LICENSE 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.
lajchon_mcright@skillsoft.com

Powershell Script - No Output

Post by lajchon_mcright@skillsoft.com » Tue Nov 14, 2006 11:55 am

Downloaded and installed latest release, 4.1.529. Attempted to run Powershell script using multiple out type commands. Ran script as "Run Script and Capture Output".I never see any output captured and the powershell.exe process that is spawned from this never returns any data, ie get-date | out-file date.txt. It will sit indefinitely without executing anything. This was originally tested with Powershell 1.0 RC2 and later with Powershell 1.0 RTW. Also, all options for the Powershell language interpreter and debugger are default.

User avatar
Alexander Riedel
Posts: 7049
Joined: Tue May 29, 2007 4:43 pm

Powershell Script - No Output

Post by Alexander Riedel » Tue Nov 14, 2006 12:00 pm

Yes, capture output will not work with the current powershell version.
There is something about how they write to the console.
Please let MS know that you would like that to work.

Alex
Alexander Riedel
SAPIEN Technologies, Inc.

lajchon_mcright@skillsoft.com

Powershell Script - No Output

Post by lajchon_mcright@skillsoft.com » Tue Nov 14, 2006 12:24 pm

Alex,Thanks for the very quick response. Since this appears to be a product limitation with the current version of Powershell, are there more details that I as an end user can pass along to Microsoft other than saying it appears to be something with how the output is being written to the console?Also, is this known-issue stated anywhere in the release notes or bug list for this release?Thanks again.

User avatar
Alexander Riedel
Posts: 7049
Joined: Tue May 29, 2007 4:43 pm

Powershell Script - No Output

Post by Alexander Riedel » Tue Nov 14, 2006 4:34 pm

I'll check where Microsoft wants input for them to be posted.
Since I will also have to create a sample program for the PowerShell folks
I'll let you know where I sent it :-)

Alex
Alexander Riedel
SAPIEN Technologies, Inc.

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

Powershell Script - No Output

Post by jhicks » Fri Nov 17, 2006 4:06 am

A workaround if you want to have a record of the console session is to use Start-Transcript and Stop-Transcript in your script.

Code: Select all

Start-Transcript -path e:temptranscript.txt
Get-Date -DisplayHint date | Tee-Object date.txt
Stop-Transcript