How can I remove duplicates from a PowerShell array?
$a = @(1,2,3,4,5,5,6,7,8,9,0,0)
Use Select-Object (whose alias is select) with the -Unique switch; e.g.:
Select-Object
select
-Unique
$a = @(1,2,3,4,5,5,6,7,8,9,0,0) $a = $a | select -Unique