PSexec tool is giving error : communicating with PsExec service on "Hostname": No process is on the other end of the pipe.

ADRookie 0 Reputation points
2024-11-26T14:44:55.81+00:00

I am trying to delete a folder which is used for "Sysmon Archive Files", which is not possible to delete without PSexec tool. But while running the PSexec tool, I am getting this error, while running

"psexec -sid cmd"

Error communicating with PsExec service on "Hostname":
No process is on the other end of the pipe.

I have tried,
pskill \Hostname PSEXESVC
sc config RemoteRegistry start= auto

sc start RemoteRegistry

sc stop psexesvc

sc start psexesvc

sc.exe stop PSEXESVC

Remove-Item –path 'C:\Windows\PSEXESVC.exe'

Remove-Item -Path hklm:\SYSTEM\CurrentControlSet\Services\PSEXESVC -Confirm:$false

Can anyone suggest any solution to be able to run PSexec tool or any native alternative?

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,360 questions
Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,718 questions
Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,178 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 55,461 Reputation points
    2024-11-26T15:14:53.47+00:00

    I don't see where you actually entered the remote server name. The syntax is: psexec \\server <options>. If the user running this command doesn't have permissions to the remote server then you'll also need to pass along the credentials to use. The remote server must have file/print sharing enabled for the communication to go through. I've also heard the default admin$ share must be enabled but haven't tested it.


  2. MotoX80 34,686 Reputation points
    2024-11-26T18:20:21.79+00:00

    If you removed the registry key (hklm:\SYSTEM\CurrentControlSet\Services\PSEXESVC) without first deleting the service (sc delete psexesvc) then you will need to reboot in order to get the service control manger back in sync with the registry.

    When we last discussed this....

    https://learn.microsoft.com/en-us/answers/questions/1495484/how-do-i-limit-the-size-of-sysmon-folder-content

    ...I had built for you a Powershell script and requested that you set the scheduled task to run as the system account. If psexec can launch a command prompt that runs as the system account and allows you to access that folder, then a powershell script that is also running as the system account should also be able to access those files.

    Did you test the script?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.