【问题标题】:Why would a get-process -computername return a couldn't connect to remote machine error?为什么 get-process -computername 返回无法连接到远程机器错误?
【发布时间】:2014-07-28 23:34:00
【问题描述】:

我可以在特定机器上执行以下命令,它可以返回多台目标计算机上的进程列表,但在一台机器上返回“无法连接到远程机器”错误。

get-process -ComputerName 192.168.1.101

  • 目标机器均未安装 powershell。
  • 我正在执行 powershell 脚本的机器安装了 2.0。
  • 我在所有机器上都拥有管理员权限。
  • 能够远程返回进程列表的目标机器是带有 SP 1 的 server 2003 Standard Edition。
  • 不远程返回进程列表的目标机器是 server 2003 R2 Standard Edition SP2。

什么会阻止我使用 powershell 从远程计算机获取进程列表?

【问题讨论】:

    标签: powershell powershell-2.0 powershell-remoting


    【解决方案1】:

    原来返回错误的机器没有启动远程注册表服务。一旦我启动了这项服务,“无法连接到远程机器”错误就消失了。这篇博文帮助我找到了解决方案http://sebastienlachance.com/post/ProcessGetProcesses-common-errors.aspx

    【讨论】:

    • 这很奇怪。我想知道为什么 RemoteRegistry 服务会与它有任何关系。
    【解决方案2】:

    我认为它使用 WMI,所以如果服务没有运行,那就可以了。你能对这些 PC 执行 Get-WMIObject 查询吗?

    【讨论】:

    • 我能够使用 Get-WMIObject win32_bios -computername targetIP 没有任何错误。目标机器确实运行了 WMI 服务。
    猜你喜欢
    • 1970-01-01
    • 2012-05-31
    • 1970-01-01
    • 2019-01-02
    • 1970-01-01
    • 2013-06-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多