Skip to content

Select-Object -unique is inconsistently case sensitive #12059

@bobfrankly

Description

@bobfrankly

Steps to reproduce

"derp","Derp" | Select-Object -unique

Expected behavior

Single Return of derp

Actual behavior

[PSCustomObject]@{Name = "derp"},[PSCustomObject]@{Name = "Derp"} | Select-Object -unique
# Returns one 'derp'

"derp","Derp" | Select-Object -unique
# Returns two, "Derp", and "derp"

"derp","Derp" | Sort-Object -unique
# Returns One 'derp'

# Also: This is also the way it behaves in 5.1, if it helps

Environment data

Name                           Value
----                           -----
PSVersion                      7.0.0
PSEdition                      Core
GitCommitId                    7.0.0
OS                             Microsoft Windows 10.0.18362
Platform                       Win32NT
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

    In-PRIndicates that a PR is out for the issueIssue-BugIssue has been identified as a bug in the productUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions