Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Invoke-Command -Session $s -Command {$PSVersionTable} Fails Due to SemanticVersion #1819

Copy link
Copy link
@mirichmo

Description

@mirichmo
Issue body actions

Steps to reproduce

  1. Install PowerShell 6.0.0-alpha.8
  2. Register its remoting endpoint
  3. Create a session to that endpoint and run Invoke-Command -Session $s -Command {$PSVersionTable}

This is another aspect of #1589 that was not fixed when addressing the original issue. The repro also shows that it works through Enter-PSSession, but not Invoke-Command.

This issue appears to be limited to the serialization & deserialization of SemanticVersion during Invoke-Command calls.

Expected behavior

The value of $PSVersionTable should be returned.

Actual behavior

PS F:\GitRepos\PowerShell> $sxs = nsn . -ConfigurationName powershell.6.0.0-alpha.8
PS F:\GitRepos\PowerShell> Invoke-Command -Session $sxs -Command {1+1}
2
PS F:\GitRepos\PowerShell> Invoke-Command -Session $sxs -Command {$psversiontable}
SemanticVersion XML tag is not recognized. Line 1, position 1046.
    + CategoryInfo          : OperationStopped: (localhost:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : JobFailure
    + PSComputerName        : localhost

PS F:\GitRepos\PowerShell> enter-pssession $sxs
[localhost]: PS C:\Users\mirichmo\Documents> $psversiontable

Name                           Value
----                           -----
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
CLRVersion
GitCommitId                    v6.0.0-alpha.8-44-ga35d6adc631309319fa9f85f142feb9b77e2b5ed
BuildVersion                   3.0.0.0
PSRemotingProtocolVersion      2.3
PSVersion                      6.0.0-alpha

Environment data

Name                           Value
----                           -----
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
CLRVersion
GitCommitId                    v6.0.0-alpha.8-44-ga35d6adc631309319fa9f85f142feb9b77e2b5ed
BuildVersion                   3.0.0.0
PSRemotingProtocolVersion      2.3
PSVersion                      6.0.0-alpha
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Backport-5.1-ConsiderConsider to backport to Windows PowerShell 5.1 due to impactConsider to backport to Windows PowerShell 5.1 due to impactResolution-FixedThe issue is fixed.The issue is fixed.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.