有好多的方法,hashtablegc xxx.txt|{$t=@{}}{$t+=@{$_}}{$t}先排序,再选择唯一gc xxx.txt|Sort-Object|Select-Object -Unique分组gc xxx.txt|group|select name