$Input is an automatic variable that lists the input entered.
Choose any other variable name and it will work - although not necessarily, as you might expect - to get the number of entries in the hash table, you need to check the Count property:
function Get-Length { param( [hashtable]$Table ) $Table.Count }
Write-Output implied when you just leave $Table.Count as it is.
In addition, the suffix () in the function name is unnecessary syntactic sugar with a zero value when you declare your parameters inline with Param() - discard it
source share