Hey All,
New to PS and looking for a script to remotely run a .exe on multiple machines. The first part is to get the list of computers and the second to run the .exe on each. Do I need to use the foreach command possibly? I don’t get an error when I run it, but I’m not getting a log file that the .exe should create once it runs.
$computers = Get-Content "C:\temp\servers.txt" Invoke-Command -ComputerName $computers -filePath C:\temp\file.exe