You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GroupObject -AsHashTable should "core" any PSObjects being used as keys #6933
There is a bug when using the -AsHashTable flag on Group-Object such that the keys in the hashtable are still wrapped in PSObject when added to the table. This makes them useless because you can't retrieve the entry and confusing because it looks like a string but it isn't. See this issue on StackOverflow and also this one
> $groupedProjects.Keys # the keys exist and look like strings
Successful
Failed
> $groupedProjects.Failed # Should be able to retrieve the corresponding value
ErrorMessage
------------
SomeError
SomeError
SomeError
SomeError
SomeError
>
Actual behavior
> $groupedProjects.Keys
Successful
Failed
> $groupedProjects.Failed # Specifying the key name fails because the actual key is a PSObject
>
Environment data
(This fails on all version of PowerShell)
>$PSVersionTable
Name Value
---------
PSVersion 6.1.0-preview.2
PSEdition Core
GitCommitId v6.1.0-preview.2
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Activity
powercode commentedon Jun 19, 2018
Just ran into this :) Any progress?