2011-09-07 18 views
8

Estoy tratando de ejecutar la siguiente declaración en el servidor alejado:PowerShell: error al ejecutar el comando usando Invoke-Command?

Invoke-Command -ComputerName server1 -ScriptBlock {Get-Process} 

pero me sale un mensaje de error:

[server1] Connecting to remote server failed with the following error message : The client cannot connect to the destination specified in the request. Verify that the serv 
ice on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS 
or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig". For more 
information, see the about_Remote_Troubleshooting Help topic. 
    + CategoryInfo   : OpenError: (:) [], PSRemotingTransportException 
    + FullyQualifiedErrorId : PSSessionStateBroken 

Cuál es la razón para esto y cómo solucionarlo?

+3

intento escribiendo Enable-PSRemoting en la computadora remota. –

Respuesta

16

Hay 2 razones basical:

1) equipo remoto no ha instalado Powershell

2) PSRemoting no está activado en el PC remoto (para que pueda leer mi comentario en su respuesta)

+1

Habilitado-PSRemoting ayudado! – jrara

+0

PD: en mi caso "Enable-PSRemoting" no fue suficiente, tuve que ejecutar después de "Enable-WSManCredSSP -Role Server" para que funcione. – expirat001

Cuestiones relacionadas