You could do something like this:
$computers = Get-Content .\computers.txt | ForEach-Object { $_ -split ',' } Invoke-Command -ComputerName $computers -ScriptBlock { Do-Stuff }
You could do something like this:
$computers = Get-Content .\computers.txt | ForEach-Object { $_ -split ',' } Invoke-Command -ComputerName $computers -ScriptBlock { Do-Stuff }