5

I am getting the following error if I try to use PsExec (psexec \\MyServer cmd, nothing fancy)

PsExec v2.1 - Execute processes remotely
Copyright (C) 2001-2013 Mark Russinovich
Sysinternals - www.sysinternals.com

Error establishing communication with PsExec service on MyServer:
Das System kann die angegebene Datei nicht finden.

(Translation of the last part: the system cannot find the file specified)

PsInfo returns:

System information for \\MyServer:
Uptime:                    346 days 22 hours 24 minutes 18 seconds
Kernel version:            Windows Server 2012 Standard, Multiprocessor Free
Product type:              Standard Edition
Product version:           6.2
Service pack:              0
Kernel build number:       9200
Registered organization:
Registered owner:          Windows User
IE version:                9.0000
System root:               C:\Windows
Processors:                1
Processor speed:           2.9 GHz
Processor type:            Intel(R) Xeon(R) CPU           X5670  @
Physical memory:           2 MB
Video driver:              VMware SVGA 3D

Now I've read that I should kill the PSEXESVC process on the server, stop the service and delete the service. I did that, but as soon as I retry it, it just recreates the service and it keeps running again.

We also tried to disable the virus scanner for a short test, but that didn't work either.

The best thing is: It worked 2 days ago!

I am out of ideas, maybe someone else could give me a hint?

4
  • 1
    Are you running this as administrator? If not, does that make a difference? Mar 28, 2014 at 12:06
  • 2
    is the user account you are running psexec under, or the account specified in the command itself an admin on the target system? psexec needs the rights on the target system to install and start a service. Mar 28, 2014 at 12:32
  • @FrankThomas Ok, looks like it really was some kind of account problem. I've tried to use -u and -p to connect with username and password, that didn't work. But starting a cmd prompt under the user that has access to the server works.
    – Core_F
    Mar 28, 2014 at 13:09
  • As the answers allude to, I've seen similar issues happen when a server is managed with different versions of PSEXEC, and one doesn't exit cleanly. Some versions don't seem to be cross compatible. This is why running the version on the server may work (if it was the one that got stuck) or why stopping the service usually works (to clear the way for any version). Oct 30, 2017 at 16:19

2 Answers 2

2

I had this same issue, after some trial and error I managed to get it working by using the following long winded command;

"\\server\psexec location\PSExec.exe" \\server.DOMAIN.com -u username -p password -e -s cmd

So I had to point to the remote PSExec.exe, then specify the server along with my networks domain name. I also had to provide my username and password but run with higher privileges (-e -s).

Give it a go!

1
  • Confirmed to be working on Windows 8.1.
    – askids
    May 4, 2020 at 3:06
2

In my case the cause was that the ADMIN$ share was disabled (for security reasons).

After enabling it in the registry and restarting the LanmanServer service PsExec worked properly.

.reg file to enable ADMIN$ share back on:

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
"AutoShareWks"=dword:00000001
"AutoShareServer"=dword:00000001

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .