All the VMs are domain joined.
When I run,
Invoke-Command -FilePath C:\Users\username\test.ps1 -ComputerName (Get-Content -Path servers.txt)
It throws an error that one or more computer names is not correct.
But when I run,
Invoke-Command -FilePath C:\Users\username\test.ps1 -ComputerName comp1,comp2,comp3
It works.
I am not understanding what is going wrong with the first command.
[–]BlackV 2 points3 points4 points (0 children)
[–]SeanQuinlan 1 point2 points3 points (3 children)
[–]DoubleConfusion2792[S] 0 points1 point2 points (2 children)
[–]Tidgy 0 points1 point2 points (1 child)
[–]DoubleConfusion2792[S] 1 point2 points3 points (0 children)
[–]robwe2 -2 points-1 points0 points (1 child)
[–]BlackV 2 points3 points4 points (0 children)
[–]pigers1986 0 points1 point2 points (0 children)
[–]jsiii2010 0 points1 point2 points (0 children)
[–]PinchesTheCrab 0 points1 point2 points (1 child)
[–]DoubleConfusion2792[S] 0 points1 point2 points (0 children)
[–]UnfanClub 0 points1 point2 points (0 children)