Skip to content

Enter-PSSession -ContainerId $id returns Object reference not set to an instance of an object. #5794

@TylerLeonhardt

Description

@TylerLeonhardt

Enter-PSSession -ContainerId $id returns Object reference not set to an instance of an object..

Steps to reproduce

  1. Create a windows docker container like: microsoft/powershell:windowsservercore from https://hub.docker.com/r/microsoft/powershell/

  2. open PSCore and run:

Enter-PSSession -ContainerId $theContainersId

Expected behavior

We see the prompt of the remote machine

Actual behavior

Enter-PSSession : Object reference not set to an instance of an object.
At line:1 char:1
+ Enter-PSSession -ContainerId (Get-Container adoring_gates).ID
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [Enter-PSSession], PSInvalidOperationException
+ FullyQualifiedErrorId : CreateRemoteRunspaceForContainerFailed,Microsoft.PowerShell.Commands.EnterPSSessionCommand

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.0-rc.2
PSEdition                      Core
GitCommitId                    v6.0.0-rc.2
OS                             Microsoft Windows 10.0.16299
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

Labels

WG-RemotingPSRP issues with any transport layer

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions