Skip to content

Get-PSSession with -ComputerName or with -connectionUri does not work #6321

@sh0375

Description

@sh0375

Steps to reproduce

1. launch pwsh
2. execute command: Get-PSSession -ComputerName "localhost"

Expected behavior

as descibed here: 
https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/get-pssession?view=powershell-6

Actual behavior

Get-PSSession : The term 'New-WSManSessionOption' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-PSSession -ComputerName "localhost"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (New-WSManSessionOption:String) [Get-PSSession], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.GetPSSessionCommand

Environment data

> $PSVersionTable
Name                           Value
----                           -----
PSVersion                      6.0.1
PSEdition                      Core
GitCommitId                    v6.0.1
OS                             Linux 3.13.0-141-generic #190-Ubuntu SMP Fri Jan 19 12:52:38 UTC 2018
Platform                       Unix
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-BugIssue has been identified as a bug in the productResolution-No ActivityIssue has had no activity for 6 months or moreWG-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