Skip to content

Default Get-ChildItem / Get-Item output doesn't list the names of system-defined junctions on Windows #10630

Closed

Description

Related:

Steps to reproduce

On Windows:

Get-ChildItem $HOME -Force -Attributes "Directory+ReparsePoint" -Filter Cookies |
  Out-String | Should -match Cookies

Get-Item $HOME/Cookies -Force | Out-String | Should -match Cookies

Note the use of Out-String so as to expect the default output formatting, which is where the problem lies; by contrast, accessing the Name property explicitly, with, say, Format-List Name, works fine.

Expected behavior

The tests should pass.

Actual behavior

The tests fail, because the Name column in the default output is blank:

Expected regular expression 'Cookies' to match '
    Directory: C:\Users\jdoe
Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
l--hs            6/5/2019 10:42 PM
', but it did not match.

Environment data

PowerShell Core 7.0.0-preview.4

Activity

  1. added
    Issue-Question
    on Sep 26, 2019
  2. iSazonov commented on Jan 30, 2020

    @iSazonov
    Collaborator

    I can not repo. It seems it was fixed in #7127.

  3. mklement0 commented on Jan 30, 2020

    @mklement0
    ContributorAuthor

    Looks like it, thanks.

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-QuestionResolution-Fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions