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
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
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
Expected behavior
Actual behavior
Environment data