opened
dmilov
username_0
Name                           Value
----                           -----
PSVersion                      6.0.0
PSEdition                      Core
GitCommitId                    v6.0.0
OS                             Linux 3.10.0-693.5.2.el7.x86_64 #1 SMP Fri Oct 20 20:32:50 UTC 2017
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
```

I managed to get detailed callstack of the exception
----------------

 -> Exception stack trace: 
    at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord) 

 -> InnerException stack trace: 
    at System.String.Substring(Int32 startIndex, Int32 length)
   at System.Management.Automation.Internal.StringUtil.TruncateToBufferCellWidth(PSHostRawUserInterface rawUI, String toTruncate, Int32 maxWidthInBufferCells)
   at Microsoft.PowerShell.ProgressNode.RenderFullDescription(String description, String indent, Int32 maxWidth, PSHostRawUserInterface rawUi, ArrayList strCollection, Boolean isFullPlus)
   at Microsoft.PowerShell.ProgressNode.LinesRequiredInFullStyleMethod(PSHostRawUserInterface rawUi, Int32 maxWidth, Boolean isFullPlus)
   at Microsoft.PowerShell.ProgressNode.LinesRequiredMethod(PSHostRawUserInterface rawUi, Int32 maxWidth)
   at Microsoft.PowerShell.PendingProgress.HeightTallyer.Visit(ProgressNode node, ArrayList unused, Int32 unusedToo)
   at Microsoft.PowerShell.PendingProgress.NodeVisitor.VisitNodes(ArrayList nodes, NodeVisitor v)
   at Microsoft.PowerShell.PendingProgress.TallyHeight(PSHostRawUserInterface rawUi, Int32 maxHeight, Int32 maxWidth)
   at Microsoft.PowerShell.PendingProgress.Render(Int32 maxWidth, Int32 maxHeight, PSHostRawUserInterface rawUI)
   at Microsoft.PowerShell.ProgressPane.Show(PendingProgress pendingProgress)
   at Microsoft.PowerShell.ConsoleHostUserInterface.HandleIncomingProgressRecord(Int64 sourceId, ProgressRecord record)
   at Microsoft.PowerShell.ConsoleHostUserInterface.WriteProgress(Int64 sourceId, ProgressRecord record)
   at System.Management.Automation.Internal.Host.InternalHostUserInterface.WriteProgress(Int64 sourceId, ProgressRecord record)
   at System.Management.Automation.MshCommandRuntime.WriteProgress(Int64 sourceId, ProgressRecord progressRecord, Boolean overrideInquire)
   at System.Management.Automation.MshCommandRuntime.WriteProgress(ProgressRecord progressRecord, Boolean overrideInquire)
   at System.Management.Automation.MshCommandRuntime.WriteProgress(ProgressRecord progressRecord)
Write-Progress throws an exception in child pwsh process on CentOS 7 (Core) 
issue
created
dmilov
username_0
@username_1 I'm able to reproduce it only on version without GUI - console only.
It is not reproducible when I connect to the same machine with PuTTy from Windows. Also I'm not able to reproduce it with the Gnome UI Terminal.
comment
created
iSazonov
username_1
Can you confirm that if you type the `'1..100 | % {Write-Progress -Activity "Test Progress" -Status "$_ % Done" -PercentComplete $_; Start-Sleep -Milliseconds 20}'` in the console it work well?
comment
created
dmilov
username_0
I confirm, it works fine in the console. The exception occurs when nested pwsh is started and its output is redirected to a file, then Write-Progress in the nested process fails.
comment
created
MaximoTrinidad
username_2
Then, the detail of using Putty is missing from the "Steps to reproduce".  Works OK from the pwsh console.

So, I pushed it further:

1.  Use the **Enter-PSSession** cmdlet - It works!
2.  Use the **ssh** comand, then open pwsh - It's functionality work, as it run without errors, but the stdout looks messy. (see image)
3.  Use **PuTTY**, installed "putty-64bit-0.70-installer.msi" - It works with no errors. I had the scroll down the  cat results to view the content of the log, as the are a page of empty lines. (see images).

Maybe the issue is with PuTTY. I downloaded version  0.70, released on 2017-07-08.

![progressbar_01_2018-01-22_9-38-47](https://user-images.githubusercontent.com/19892435/35226237-ab5eff1e-ff58-11e7-8bb3-08c12b5ac3d1.jpg)

![progressbar_02_2018-01-22_9-38-47](https://user-images.githubusercontent.com/19892435/35226246-b37b2a24-ff58-11e7-9dd7-024a9e0c9033.jpg)

![progressbar_03_2018-01-22_9-38-47](https://user-images.githubusercontent.com/19892435/35226256-b91094a6-ff58-11e7-92df-5e5334333af6.jpg)

So, there's still something with the output to screen and I think this has been previously reported.
:)
comment
created
dmilov
username_0
@username_2 As I said it is NOT reproducible with PuTTy. It is only reproducible with the CentOS console.

![centosconsole](https://user-images.githubusercontent.com/10736688/35262573-e1072fcc-001d-11e8-9ebd-e8d68f716521.jpg)
comment