Skip to content

Enter-PSHostProcess does not work within an SSH remoting session. #2453

@PaulHigin

Description

@PaulHigin

You should be able to use PowerShell IPC (Enter-PSHostProcess) from within an SSH remote session just as you now can from within a WinRM remote session.

Steps to reproduce

Enter-PSSession -HostName computerName -UserName userName
[computerName]: PS C:\> Get-PSHostProcessInfo

ProcessName           ProcessId AppDomainName
-----------           --------- -------------
powershell                17324 DefaultAppDomain
powershell                12260 DefaultAppDomain
powershell                22696 DefaultAppDomain
wsmprovhost               16644 DefaultAppDomain

[computerName]: PS C:\> Enter-PSHostProcess 22696
Specified method is not supported.
    + CategoryInfo          : InvalidOperation: (Microsoft.Power...tProcessCommand:EnterPSHostProcessCommand) [Enter-PSHostProcess], PSNotSupportedException
    + FullyQualifiedErrorId : EnterPSHostProcessCannotPushRunspace,Microsoft.PowerShell.Commands.EnterPSHostProcessCommand

Expected behavior

Connecting to a local process from within an SSH remote session should succeed.

Actual behavior

Not supported error.

Environment data

WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
CLRVersion
GitCommitId                    v6.0.0-alpha.10-52-g6a618a3ad8bce9fdf6ae8ef78747538696d0d9e5-dirty
PSEdition                      Core
SerializationVersion           1.1.0.1
BuildVersion                   3.0.0.0
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSVersion                      6.0.0-alpha

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.WG-RemotingPSRP issues with any transport layer

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions