Group-Object - enumerate only one property and not type or hash table
As one of the tags say, this is for PS 5.1. I have a similar scenario as in the docs, but without -NoElement, and I'm focusing on the Group column. When I run this @( @{ name = 'a' ; weight = 7 } @{ name = 'b' ; weight = 1 } @{ name = 'c' ; weight = 3 } @{ name = 'd' ; weight = 7 } ) | Group-Object -Property { $_.weight } I get this: {System.Collections.Hashtable, System.Collections.Hashtable} {System.Collections.Hashtable} {System.Collections.Hashtable} The expected output would be: {a, d} {b} {c} I've found one SO question that addresses this: Group-Object is showing a hashtable when using c
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.