Stop retyping PowerShell commands, these 5 cmdlets do the work for you and will save you more time than you realize.
Each line from computers.txt is piped to ForEach-Object which runs the MyFunction command passing the current computer name as the parameter value ($_) for the computer parameter. For a small list, ...