Skip to content

OCGV: Does not seem to work in remote PSSession #123

@lahell

Description

@lahell

Piping to Out-ConsoleGridView after Enter-PSSession produces an error and exits the PSSession. I have tried from Windows to MacOS and Windows to Ubuntu (WSL) using PowerShell 7.0.3 and Microsoft.PowerShell.ConsoleGuiTools 0.6.1.

PS C:\Users\admin> $session = New-PSSession -HostName computer -UserName admin
admin@computer's password:
PS C:\Users\admin> Enter-PSSession -Session $session
[admin@computer]: PS /home/admin> Get-Process | Out-ConsoleGridView
There is an error processing data from the background process. Error reported: 'exadecimal value 0x1B, is an invalid character. Line 1, position 1..
PS C:\Users\admin>

Is it caused by ESC in Dispose()?

If it's not supposed to work in PSSession then perhaps check for the existence of $PSSenderInfo and handle it more gracefully without crashing out of the session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions