PSEXEC The system cannot find the file specified error

batch-filepsexecvbscript

I'm trying to run a batch script on multiple servers using a vbscript that's from another server. I'm using psexec on my local machine to run this batch script.

This is the script I'm running:(This is server 2003)

    psexec -s -accepteula \\SERVERNAME -u userName -p DOMAIN\password cmd.exe
    /c cscript \\otherServerName\c$\folder\script.vbs

I'm getting this error:

    Error establishing communication with PsExec service on SERVERNAME
    The system cannot find the file specified.

I'm running this script on server 2003, 2008, and 2012. When I try to run the script on a server 2008 server it gives me an "access denied" error despite the fact that I'm using administrator credentials.

Best Answer

Maybe you just copied the command incorrectly, but DOMAIN\ should precede the userName, not the password.

I am also having the same error though, with the very simple command

psexec \\SERVER cmd

I've found it seems to be a problem with PsTools 2.1; I can execute this command with PsTools 1.98 and it works fine. You might want to try using a different version of PsTools.