Run a batch file on remote servers
Solution 1:
You could try using PsExec. If the batch file is present in all machines at same location, then you could mention the list of machines in a text file and give it as an argument to this.Something like,
psexec @<machines_list_file> <location to batch file on remote machines>
If you dont have it on remote machine, you need to copy the batch file and then execute it using,
psexec @<machines_list_file> -c <location to batch file in current machine>
Solution 2:
May I suggest writing a single local script that:
- Uses
net start/start
\server to start/stop service remotely. - Deletes a file on
\\server\d$\...
You can iterate over a list of server names and run those 2 commands.