Skip to content

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

Closed

Description

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

Activity

  1. added
    Issue-Question
    on Mar 18, 2019
  2. iSazonov commented on Mar 19, 2019

    @iSazonov
    Collaborator

    Aditya Patwardhan (@adityapatwardhan) Is the same root cause as in #9160?

  3. adityapatwardhan commented on Mar 19, 2019

    @adityapatwardhan
    Member

    Yuriy Samorodov (@YuriySamorodov) Can you try a repro on the latest 6.2.0-rc.1 release?

  4. YuriySamorodov commented on Mar 19, 2019

    @YuriySamorodov
    Author
  5. iSazonov commented on Jan 30, 2020

    @iSazonov
    Collaborator

    /cc Paul Higinbotham (@PaulHigin) Could you please comment the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions