Author: nlks
Subject: PSexec to run remote batch file
Posted: 27 March 2013 at 11:56am
Hi,
Subject: PSexec to run remote batch file
Posted: 27 March 2013 at 11:56am
Hi,
I'm try to run Psexec to execute a "remote" command but get error.
I run this script on ComputerA, psexec to ComputerB, & run a batch file located at ComputerA, a double hops.
Below is the code:
C:\psexec>PsExec \\ComputerB -u MYDOMAIN/MYID -p MYPWD -w "E:\Program Files" "\\ComputerA\a.bat"
I get an "Access denied" to the a.bat even I give NTFS permission to "Everyone". I know I'm using my ID to remote to ComputerB, but not sure what ID it used to come back to retrieve the batch file.
As well I know it would work if I copy the batch to ComputerB, but I have several locations to look at so I dun want to copy into all of them, but to centralize it.
I just want to know whether my concept will work with Psexec?