简体   繁体   中英

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.

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).

The error 1722 is : The RPC server is unavailable. Verify if RPC service (Remote Procedure Call (RPC)) is running at remote machine with telnet, try at command line:
*>telnet your.server 135

If no errors occurs the RPC server is probably ok, than check system events for issues.

6 years later but anyaway.

Enable File and printer sharing on the remote computer and it will work.

https://support.microsoft.com/en-us/kb/323790

I tested on my localmachine 在PCxxxx4上运行SC QUERY

I tested from another machine on the network 在PCxxxx0上运行SC QUERY

SC is nice..! :)

You need to make sure that the Client DNS service is not stopped. This fixes the problem.

您是否将该例外添加到防火墙?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM