I have, for example, this one liner:
get-process | select id, processname | %{$_.processname +"="+ $_.id} | ConvertFrom-StringData
which returns a key and value pair of each process and its id.
My goal is to remove any processes with duplicated name and leaving only one of them (for example, I want to be left with only one entry of svchost), in a one liner.
Nothing seems to be working for me, and im not sure that ConvertFrom-StringData is the right direction, and do not understand how it succeeds converting it to hashtable with duplicated keys.