Skip to content

Get-PSSession with -ComputerName does not work #20995

@c2ho

Description

@c2ho

Prerequisites

Steps to reproduce

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

This has already been stated in #6321 (and #17768?) but those were closed due to inactivity and as the bot closed those for housekeeping, I now create a new one.

Expected behavior

Id    Name    ComputerName    ComputerType    State    ConfigurationName    Availability
--    ----    ------------    ------------    -----    -----------------    ------------
1     WinRM1  dc01            RemoteMachine   Opened   Microsoft.PowerShell Available



_(copied from a Windows machine executing the same command)_

Actual behavior

PS> Get-PSSession -ComputerName dc01       
                                                                                                                                                                                                                                       
Get-PSSession: The term 'New-WSManSessionOption' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.0
PSEdition                      Core
GitCommitId                    7.4.0
OS                             Kali GNU/Linux Rolling
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions