Psexec error establishing communication with psexec service on

A blog about tips, tricks, free PowerShell scripts, free tools and easy solutions for various day to day and advance tasks of system administrators.

Hi All,
 I ran in to
an issue while trying to start a Service on remote server by using the PsExec
command

While running the
below command

PsExec \192.168.100.1 -u username -p password net
start «Sample service»

This was
failing with below error. I tried to execute this from command prompt of
192.168.100.2 and getting the error

Error establishing communication with PsExec
service on 192.168.100.1:

The system cannot find the file specified.

I have browsed the
internet for the above error but none of the answers on Internet had helped me.

Then the solution
came in below way …

During investigation I have found that the 192.168.100.1 server was
already having PSEXESVC service in place on server which logically should not
be there as the PSexec command will each time try to create this PSEXESVC
 service for temporary purpose only, which gets removed after each
execution. As a result whenever the PSexec was trying to create temporary
PSEXESVC service it was receiving exception that the service already exist. Now
we have taken care of it and everything seems to be working fine.

Steps to be
performed to resolve the issue:

1.      
Make sure PSexec
exe is present on server

2.      
Go to Services.msc
and check if service PSEXESVC exist
on remote server

3.      
If service exist, please stop the service and
remove its .exe file as well

4.      
You can get .exe file details from service
properties tab

5.      
Now try to execute your desired command, it
should run properly now.

A couple things
to look at are:

·        
Clean out older instances of psexecsvc.

·        
Ensure you have the latest version of the pstools. 

·        
Ensure you are using the same versions of psexec on all your machines.

·        
Use process of
elimination to figure out what events are leaving the psexecsvc process
running. The psexecsvc.exe should automatically exit and remove itself from
%windir% where it is temporarily placed during execution.

Apart from the above
solution you can always use the below alternative method which works perfect.

SC \192.168.100.1 start » Sample service «

SC \192.168.100.1 stop » Sample service «

Kindly Share your experience in comment section with my blog/post if it did help you !!

Stay Blessed!!
 
Thank You!!

RRS feed

  • Remove From My Forums
  • Question

  • Hi Tech Support,

    I got below error when using psexec on remote computer (india). user123 is admin at india. Admin$ and IPC$ can access without error. Please help….

    psexec \india -u indiauser123 -p admin@123 -h cmd

    Error establishing communication with PsExec service on india:
    Access is denied.

All replies

  • Hi,

    What’s the error message before Access is denied?

    On my test machine it show me as the following screenshots.

    After I add the
    LocalAccountTokenFilterPolicy registry, it can access successfully.

    Please try to take following steps to see if it can work.
     

    (Before you do this please back up your registry. Here is link:
    https://support.microsoft.com/en-us/help/322756/how-to-back-up-and-restore-the-registry-in-windows)

    1. Click Start, click Run, type regedit, and then press ENTER.

    2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem

    3. If the LocalAccountTokenFilterPolicy registry entry does not exist, follow these steps: 

    3.1 On the Edit menu, point to
           New, and then click DWORD Value.

    3.2 Type
           LocalAccountTokenFilterPolicy, and then press ENTER.

    4. Right-click LocalAccountTokenFilterPolicy, and then click
    Modify.

    5. In the Value data box, type
    1, and then click OK.

    6. Exit Registry Editor.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

  • Thanks Vera Hu for reply.

    I’ve do what you list but still get same error.

  • Sysinternals is not a Default Win 7 software.

    https://docs.microsoft.com/en-us/sysinternals/

    Actually its a 3rd party installation,even if it came from TechNet/Microsoft.Youre best bet,in run or cmd type: services.msc  scroll to remote data,double click,reset its start-up & defaults.Also,Win firewall might be edited,allow remote data.The
    normal «Access Denied» comes from user account/uncheck parental software…Also,do youre editing in Win Power Shell.

  • Please check if you run the PsExec service on 10.XXX PC.

    If no, you need to also download the PsTools, and run the
    PsExec.exe.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

  • Hi, 

    How’s everything going? Please feel free to give me any update.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact
    tnmff@microsoft.com.

  • Still not working until my pc has restart for windows updates. Suddenly psexec working back. When psexec on my pc not function. I can using & run it at another pc.

    I think maybe some setting at policy make it cannot run from my pc.

  • Has anyone find a solution to the «Access Denied» issue?

    • Proposed as answer by

      Tuesday, October 2, 2018 5:48 PM

    • Unproposed as answer by
      JSneade_Z
      Tuesday, October 2, 2018 5:49 PM

  • Even when using a (remote) local Administrator account, the Remote UAC will still block remote execution.

    There is a flag in the registry that can disable the UAC behavior and return remote execution back to normal:

    1. Open RegEdit on your remote server
    2. Navigate to:
      HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionPoliciesSystem
    3. Add a new DWORD value:
      LocalAccountTokenFilterPolicy
    4. Set LocalAccountTokenFilterPolicy =  1
    5. Reboot the remote machine.

    Try running PSExec again from your local server
    You should be able to execute remote commands.

Error establishing communication with PsExec service, when DLP endpoint agent is running

calendar_today

Updated On:

Products

Data Loss Prevention Endpoint Prevent

Issue/Introduction

You are trying to run a command using the PsExec app (sysinternals) via a command prompt with the DLP endpoint agent installed, but receive the error below. The problem does not appear when the DLP endpoint agent is disabled.

Error message:

«Error establishing communication with PsExec service on [machinename] :
Access is denied»

Environment

PsExec  ver.2.2 or newer (important as the older version can produce a different output in Getappinfo)

Resolution

The psexec.exe application should be whitelisted in the Enforce console

The configuration below resolves the issue — using only the binary name «PsExec.exe»:

In ver. 15.5 MP1 whitelisting is not needed, issue does not appear.

Attachments

Feedback

thumb_up
Yes

thumb_down
No

Понравилась статья? Поделить с друзьями:
  • Psexec error code 1603
  • Pubg mobile код ошибки 70254639
  • Psexec error 6118
  • Pubg mobile lite сервер перегружен попробуйте позже код ошибки simulator limit
  • Psecure violation error detected on