# Run an exe file that exists on a different server from a SQL Server Job

We have an .exe file on a server, say Server1 which should be run from a SQL Server job that exists on a different server, e.g.: Server2. How can it be done?

I know if it's a local file, I can use xp_cmdshell in the Job step and run the .exe file, but in our case, this file exists on a different server. If it's doable, what security permissions should be set up to achieve it?

You could still use xp_cmdshell; however, you'll need to make sure that your SQL Server Service account (the AD account used to run SQL Server) has access to the directory containing the exe file and any other directories that that program may require.
xp_cmdshell runs on your SQL Server itself; you can use it just like any other command window.
If, on the other hand, you need the exe to run on the machine that hosts it, then you'll need to look at other options.