windows 服务命令 RPC 错误(sc.exe 或 psservice)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/639901/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 12:08:31  来源:igfitidea点击:

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

windowswindows-services

提问by sundar venugopal

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.

任何解决方案让我知道。

回答by Ricky

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

同样值得注意的是:机器名称之前实际上应该有两个斜杠(我确定这只是一个错字,但以防万一它可能会混淆任何人)。

回答by lsalamon

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

错误 1722 是:RPC 服务器不可用。使用 telnet 验证 RPC 服务(远程过程调用 (RPC))是否在远程计算机上运行,​​请在命令行尝试:
*>telnet your.server 135

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

如果没有发生错误,则 RPC 服务器可能没问题,然后检查系统事件是否有问题。

回答by Daniel Bj?rk

6 years later but anyaway.

6 年后,但无论如何。

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

在远程计算机上启用文件和打印机共享,它将起作用。

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

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

回答by BR1COP

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

您需要确保客户端 DNS 服务没有停止。这解决了问题。

回答by Rhak Kahr

I tested on my localmachine run SC QUERY on PCxxxx4

我在我的本地机器上测试过 在 PCxxxx4 上运行 SC QUERY

I tested from another machine on the network run SC QUERY on PCxxxx0

我在网络上的另一台机器上测试过 在 PCxxxx0 上运行 SC QUERY

SC is nice..! :)

SC很好..!:)