Skip to content

Runspace object formatting 'Type' column is inconsistent for remote runspaces #9341

Closed

Description

Currently the 'Type' column of the formatted output for a runspace object is 'local' unless the runspace is a WSMan remote runspace. Consequently a SSH session runspace is labled as 'local', which is incorrect.

It might make sense to mark other remote runspaces that can only connect to local machine (out-of-proc, named pipe, hyper-v socket) to be marked 'local'. But since SSH can go off-box like WSMan, it should be marked 'remote' instead of 'local'.

Personally, I would like to see all remote runspaces marked 'remote' even if the underlying transport can only connect to the local machine, because they all use the remoting system. The 'ComputerName' column will clarify where the connection is to (localhost or remote computer name).

Steps to reproduce

# Create an SSH session
$sshSession = New-PSSession -HostName <computerName>

# Output runspace object
$sshSession.Runspace

 Id Name             ComputerName    Type         State      Availability
 -- ----             ------------    ----         -----      ------------
11  Runspace11       localhost       Local        Opened     Busy

Expected behavior

'Type' column should be 'Remote'

Actual behavior

'Type' column is 'Local'

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.0
PSEdition                      Core
GitCommitId                    6.2.0
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Activity

  1. added
    Issue-Bug
    on Apr 11, 2019
  2. SeeminglyScience commented on Apr 11, 2019

    @SeeminglyScience
    Contributor

    Personally, I would like to see all remote runspaces marked 'remote' even if the underlying transport can only connect to the local machine, because they all use the remoting system. The 'ComputerName' column will clarify where the connection is to (localhost or remote computer name).

    I always read Remote as "out of process" or "my in/output will be serialized" so 👍 imo.

  3. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  4. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  5. microsoft-github-policy-service commented on Nov 16, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has not had any activity in 6 months, if this is a bug please try to reproduce on the latest version of PowerShell and reopen a new issue and reference this issue if this is still a blocker for you.

  6. added
    Resolution-No Activity
    on Nov 16, 2023
  7. microsoft-github-policy-service commented on Nov 23, 2023

    @microsoft-github-policy-service
    Contributor

    This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugResolution-No Activity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions