How to run a batch file remotely?

To those that are interested in learning how to run a batch file on a remote computer. You can do this by using the ‘PSEXEC’ tool.

Here is the command to do it:

psexec \\computername -u administrator -p passwd -d -c “c:\yourbatchfile.bat”

What this does is that it will log into the ‘computername’ station with the username ‘administrator’ and password ‘passwd’. Once logged in, it will copy the ‘yourbatchfile.bat’ and run it.