Try without get-content . Try the following:
Get-Service *vault* -ComputerName c:\users\sean\desktop\js.txt | select name,status,machinename | sort machinename | format-table -autosize
If this does not work, try:
$Computers = Get-Content c:\users\sean\desktop\js.txt Get-Service *vault* -computername $Computers | Select name,status,machinename |sort machinename |format-table -autosize
If you want a single line font, try the following:
Get-Content c:\users\sean\desktop\js.txt | Get-Service *vault* | Select name,status,machinename |sort machinename |format-table -autosize
At first I tried the top one. I would check, but I do not have access to everything that I can do with proper testing right now.
Nick source share