Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot enter a PSsession if remote Powershell version is 3 or under. #843

Closed
MakwaWes opened this issue Jun 7, 2017 · 2 comments
Closed
Labels
Area-Extension Terminal Issue-Bug A bug to squash. Resolution-Answered Will close automatically.

Comments

@MakwaWes
Copy link

MakwaWes commented Jun 7, 2017

System Details

  • Operating system name and version:
    Windows 10 - 10.0.14393
    Windows Server 2012 - 6.2.9200

  • VS Code version:
    1.12.2

  • Editor Services :
    1.2.1.0

  • PowerShell extension version:

alefragnani.project-manager@0.18.0
codezombiech.gitignore@0.5.0
donjayamanne.git-extension-pack@0.1.2
donjayamanne.githistory@0.2.0
DotJoshJohnson.xml@1.8.0
DougFinke.vscode-PSStackoverflow@0.0.2
eamodio.gitlens@3.6.1
gerane.Theme-Blackboard@0.0.2
golf1052.code-sync@2.2.0
ms-vscode.PowerShell@1.2.1
robertohuertasm.vscode-icons@7.9.0
RolandGreim.sharecode@0.4.1
ziyasal.vscode-open-in-github@1.2.7
  • Output from $PSVersionTable:
    From the client machine :
PSVersion                      5.1.14393.1198
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.1198
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

On the remote server :

PSVersion                      3.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.36366
BuildVersion                   6.2.9200.17065
PSCompatibleVersions           {1.0, 2.0, 3.0}
PSRemotingProtocolVersion      2.2

Issue Description

While in VSCode, trying to enter a PS session on a remote machine using PowerShell version 3 or less will fail in the Integrated Terminal with the following error :
Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an object.
                           at Microsoft.PowerShell.EditorServices.PowerShellContext.<>c__49`1.<ExecuteScriptAndGetItem>b__49_0(PSObject pso)
                           at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
                           at System.Linq.Enumerable.<OfTypeIterator>d__92`1.MoveNext()
                           at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
                           at Microsoft.PowerShell.EditorServices.PowerShellContext.ExecuteScriptAndGetItem[TResult](String scriptToExecute, Runspace runspace,
                        TResult defaultValue)
                           at Microsoft.PowerShell.EditorServices.Session.RunspaceDetails.CreateFromRunspace(Runspace runspace, SessionDetails sessionDetails)
                           at Microsoft.PowerShell.EditorServices.PowerShellContext.System.Management.Automation.Host.IHostSupportsInteractiveSession.PushRunspace(R
                        unspace runspace)
                           at Microsoft.PowerShell.Commands.EnterPSSessionCommand.ProcessRecord()
                           at System.Management.Automation.CommandProcessor.ProcessRecord()

Regards,
Wesley

@daviwil
Copy link
Contributor

daviwil commented Jun 7, 2017

Thanks Wesley! I'll look into it.

@daviwil daviwil added this to the June 2017 milestone Jun 7, 2017
@daviwil daviwil modified the milestones: June 2017, July 2017 Jul 11, 2017
@daviwil daviwil modified the milestones: July 2017, Future Oct 26, 2017
@JustinGrote
Copy link
Collaborator

@TylerLeonhardt @SydneyhSmith since support for PS3 was dropped this can be closed as "wontfix"

@ghost ghost added the Needs: Maintainer Attention Maintainer attention needed! label Apr 22, 2020
@SydneyhSmith SydneyhSmith added Resolution-Answered Will close automatically. and removed Needs: Maintainer Attention Maintainer attention needed! labels Apr 23, 2020
@ghost ghost closed this as completed Apr 24, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Extension Terminal Issue-Bug A bug to squash. Resolution-Answered Will close automatically.
Projects
None yet
Development

No branches or pull requests

4 participants