Skip to content

Using Enter-PSSession -ContainerId is hardcoded to powershell.exe #6669

@SteveL-MSFT

Description

@SteveL-MSFT

The code to connect to a container is hardcoded to start powershell.exe. Need to expose a parameter to allow starting pwsh.

Also, -ContainerId requires full hash and not just the partial hash which is a usability problem.

Steps to reproduce

docker run microsoft/windowsservercore
# get containerid
docker ps
enter-pssession -containerid <containerId>

Expected behavior

Ability to connect to PowerShell Core via PowerShell Direct

Actual behavior

Can only connect to Windows PowerShell

Environment data

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.1
PSEdition                      Core
GitCommitId                    v6.1.0-preview.1
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugResolution-AnsweredThe question is answered.WG-RemotingPSRP issues with any transport layer

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions