powershell - Get-Process to remote computer doesn't work but Invoke-Command does -
i have 2 servers running windows server 2012 r2. 1 of them hosting virtual machine running windows 7 32-bit, , trying use other server view running processes of virtual machine.
i had use enable-psremoting -skipnetworkprofilecheck work. had add computers each others trustedhosts lists.
get-process -computername vm01
will return "couldn't connect remote machine". however,
invoke-command -computername vm01 -scriptblock {get-process}
works fine. difference between using invoke-command , using get-process computername argument? in case important, can use enter-pssession without problems
get-process
uses dcom/rpc remoting protocol instead of windows remote management (winrm), powershell remoting (eg. invoke-command
) uses. if have firewall blocking dcom/rpc, see how get-process
-computername
parameter fail. powershell remoting (via winrm), need open tcp 5985 (http) , tcp 5986 (https, optional).
Comments
Post a Comment