Why would a get-process -computername return a couldn't connect to remote machine error?

瘦欲@ 提交于 2019-12-22 13:57:11

问题


I can execute the following command on a specific machine and it can return a list of processes on several target computers but returns a "Couldn't connect to remote machine" error on one machine.

get-process -ComputerName 192.168.1.101

  • None of the target machines have powershell installed.
  • The machine I am executing the powershell script on has 2.0 installed.
  • I have admin privileges on all machines.
  • The target machines that are able to return a list of processes remotely are server 2003 Standard Edition with SP 1.
  • The target machine that does not return a list of processes remotely is server 2003 R2 Standard Edition SP2.

What would prevent me from getting a list of processes from a remote machine using powershell?


回答1:


It turns out the machine that was returning the error did not have the Remote Registry service started. Once I started this service the "Couldn't connect to remote machine" error went away. This blog post helped me find the solution http://sebastienlachance.com/post/ProcessGetProcesses-common-errors.aspx




回答2:


I think it uses WMI, so if the service isn't running, that would do it. Can you execute Get-WMIObject queries against those PCs at all?



来源:https://stackoverflow.com/questions/4868178/why-would-a-get-process-computername-return-a-couldnt-connect-to-remote-machin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!