How did you construct your text file?
Does Get-Content -Path c:\temp\vm.txt return a line with testfailover on there?
As another test do a Get-VM -Name (Get-Content -Path c:\temp\vm.txt)
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference