8000 Get-PSSession -State Opened -ComputerName localhost Returns Nothing · Issue #9161 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Get-PSSession -State Opened -ComputerName localhost Returns Nothing #9161

@YuriySamorodov

Description

@YuriySamorodov

Get-PSSession -State Opened -Computername localhost returns nothing despite there is an opened session:

image

Environment:

Name             : ConsoleHost
Version          : 6.1.0-preview.2

Steps to reproduce

$session = New-PSSession -ConnectionUri https://exchange.domain.local/powershell -AllowRedirection:$true -SessionOption $PSSessionOption -Authentication NegotiateWithImplicitCredential -ConfigurationName Microsoft.Exchange ;
Get-PSSession ;
Get-PSSession -State Opened -ComputerName localhost ;
Get-PSSession -State Opened -ComputerName 127.0.0.1 ;

Expected behavior

PS C:\Program Files\PowerShell\6-preview> Get-PSSession

 Id Name            Transport ComputerName    ComputerType    State         ConfigurationName    Availability
 -- ----            --------- ------------    ------------    -----         -----------------     ------------
  2 Runspace2       WSMan     exchange.dom... RemoteMachine   Opened        Microsoft.Exchange       Available

Actual behavior

( Get-PSSession -State Opened -ComputerName localhost ) -eq $null
True
( Get-PSSession -State Opened -ComputerName 127.0.0.1 ) -eq $null
True

Environment data

$Host
Name             : ConsoleHost
Version          : 6.1.0-preview.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get a

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0