How to execute a batch file on a remote computer?

.net, batch-file, tfsbuild, wmi

Solution

Try to use the sysinternal tools PSExec

It will allow you to remotely execute a file

Problem

I would like to be able to run a batch file on a remote computer after a build, where the build output and batch file are living on the build machine. In other words, i want the batch file that is running on the remote computer to be located on the build server, available through a UNC path. I've looked at WMI (System.Management) namespace, but haven't found the correct way of telling it to look at a UNC path for the batch file. Solutions other than WMI are also appreciated. Kevin

Original source