Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

windows service command RPC error (sc.exe or psservice)

I am getting the following error when i try to run the command from remote machine

C:\>sc \\machinename query
[SC] OpenSCManager FAILED 1722:

The RPC server is unavailable.
  • I have admin privileges to that machine.

Any solution let me know.

like image 293
sundar venugopal Avatar asked Mar 12 '09 18:03

sundar venugopal


1 Answers

In my case I got this error because I was messed up the name of the server I was targeting. It will give you this error if you accidentally point it at nothing. In my case, the server name was a variable being defined from a text document so it took a while for me to realize.

Also noteworthy: There should actually be two slashes before the machine name (I'm sure it's just a typo, but just in case it could confuse anybody).

like image 199
Ricky Avatar answered Sep 19 '22 15:09

Ricky