I am trying to run *.bat file on a remote computer using psexec tool.
I need to run psexec using domain admin credentials, otherwise i will receive "access denied" error.
Doing it manually works fine:
Run cmd, launch "C:\pstools\psexec.exe \\user-pc -u domain\admin -p password cmd /k", it goes into CMD on a remote computer.
Then i type "start \\share\script.bat" and it launches my batch file.
But when using RDM i cannot complete my task.
Command in psexec macro/script tool looks like this, as it is recommended in FAQs:
c:\pstools\psexec.exe \\user-pc -u domain\user -p password cmd /k
And i get this error, because apparently it tries to run psexec on a remote computer, and there is no such file:
Command in psexec macro/script tool looks like this:
cmd /k start \\share\user\script.bat
That way, i can get into a remote cmd, but without executing bach file, and i cant use domain credentials.
Using just a command line tool. I can launch psexec locally and give it some arguments, like computer name and credentials:
\\$HOST$ -u domain\user -p password cmd /k
That way, i can get into a remote cmd, but again, without executing a batch file.
If i modify arguments to look like "\\$HOST$ -u domain\user -p password cmd /k start \\share\script.bat", it only goes into a remote cmd, without executing a batch file.
What am i doing wrong?