Get-Unique compares each item in a list with the next item in the list and will only work against sorted lists.
If you want to user Get-Unique you have to sort the list first:
$a | Sort-Object -Property Id | Get-Unique
Or you could use Select-Object to select unique entries from the list:
$a | Select-Object -Unique