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 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.
This topic is 17 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
lajchon_mcright@skillsoft.com

Powershell Script - No Output

Post by lajchon_mcright@skillsoft.com »

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: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Powershell Script - No Output

Post by Alexander Riedel »

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 »

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: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Powershell Script - No Output

Post by Alexander Riedel »

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
Last visit: Mon Oct 19, 2015 9:21 am

Powershell Script - No Output

Post by jhicks »

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
This topic is 17 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked