get-adcomputer will not bind properly to another function even when it contains a valid string parameter with the 'name' alias.
According to other articles I read this problem may be prevalent in other/all AD cmdlets. To work around this bug you have to use | Select * | as an intermediate step to correctly bind to your $computername/$name parameter.
Michael Anselmi commented
see attached url for example: https://serverfault.com/questions/630920/pipeline-input-to-functions-write-progress-and-alias