how to sort objects by value length in powershell

Question:

how can I get the object with smaller name size from an array?

$a

Name Value
—- —–
name A
name AAAA
name BB
name AAAAAA

$a | get-smaller -property “name” ==> should return the object with name = A

thanks

Answer:

Source:

how to sort objects by value length in powershell by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply