WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: erezpaz on May 01, 2015, 09:29:29 AM

Title: Run a script on remote server
Post by: erezpaz on May 01, 2015, 09:29:29 AM
Hi,

Is there a command to run a script on remote server as MS Psexec does?
I cannot use Psexec due to license issues.

Thanks
Erez
Title: Re: Run a script on remote server
Post by: td on May 01, 2015, 09:45:06 AM
Psexec.exe is certainly the best choice and WinBatch doesn't have a function that can duplicate it.   You could try using WMI but it is often stymied by security features and disabled services.  An example can be found here

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/WMI+Run~an~Application~on~a~Remote~Computer.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/WMI+Run~an~Application~on~a~Remote~Computer.txt)

or here

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/WMI+WMI~and~Remote~Interactive~Desktop~Scripts.txt (http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/WMI+WMI~and~Remote~Interactive~Desktop~Scripts.txt)

The WinBatch ObjectCreate function can be used to create COM Automation objects on remote computers but again this method is often thwarted by security features and service requirements.