Output stream stops going to console in ISE

This topic contains 8 replies, has 5 voices, and was last updated by  Frank DeGraner 1 year, 7 months ago.

  • Author
  • #27771

    Joel Newton


    I'm finding that, after working for a while in an ISE session, the contents of the output stream stop appearing in the output pane. No errors – just no output. "Write-Output 'test' " produces a blank line. How would I find out if some command / something I've executed has hijacked my output stream, and reset it to appear in the output pane?


  • #27772


    I am sure you have tried other commands too right?

    I would try:

     Write-Output "test" > C:\test\test.txt

    or this:

    Write-Host "test" -ForegroundColor Green

    See if you get anything in the txt file.
    By the way, the file doesn't have to exist, but the folder does.

  • #27773

    Joel Newton

    Thanks, i255d. Redirecting Write-Output to a file does result in the output correctly showing up in the file. Write-Host hasn't stopped working – Write-Error and Write-Warning work as well. It's just Write-Output content that doesn't appear and anything that uses that stream.

    For example, Get-Help Invoke-Command returns an empty line.


  • #27806

    Joel Newton

    Anyone seen this behavior at all?
    It's very disruptive to my coding and I'd like to get it resolved.

  • #28144


    I've seen this issue myself in recent weeks, on multiple machines. I may have narrowed it down, by chance are you using the PowerShell Transcription GPO? I turned it off on one of my machines, and the problem went away... I turned transcription back on last Friday, and the issue is back today.

  • #28246

    Joel Newton

    Hi, Kwyjibo,

    I'm not familiar with the Transcript GPO. I do make regular use of PS transcripts, though.


  • #44296

    Anybody have the solution for this ?
    Im having the same problem, Im using PowerShell ISE on Windows Server 2012 R2.

  • #44354

    Joel Newton

    No solution, yet, but a possible lead: it seems to happen most consistently in conjunction with executing a script that does a chef-client run from the command line. Like somehow that chef-client run hijacks the console output, so it's going somewhere other than the ISE.

  • #58417

    Frank DeGraner

    I've got the same problem. I thought it might be a scope issue because I was testing on a Hyper-V host over RDP. And the script is stored on a file share. So I got on the console of the server (Server 2016), copied the script to the Desktop. Same results. I'm running the ISE as Administrator because I need to manipulate VMs.

    The function in question is getting the correct values but I can't retrieve and Write-Output/Write-Host the values from outside function... I've tried 'Return $myvalue' and 'Set-Variable -Name myvalue -Value 'somevalue' -Scope Global' ... same results...

    Major  Minor  Build  Revision
    -----  -----  -----  --------
    5      1      14393  206 

You must be logged in to reply to this topic.