Your code seems fine, so I would assume there is something in the text file with the computer list that is wrong, it should have only the computer names and nothing else, no \\ no quotes or anything.
A technician-grade script that wrestles with deprecated tools, requires prep steps, then runs an exhaustive cleanup.
Some results have been hidden because they may be inaccessible to you
Show inaccessible results