2011-09-07 8 views
8

Sto cercando di eseguire la seguente dichiarazione sul server di più a distanza:PowerShell: errore nell'esecuzione del comando usando Invoke-Command?

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

ma ottengo un messaggio di errore:

[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 

Qual è la ragione di questo e su come risolvere il problema?

+3

prova digitando Enable-PSRemoting nel computer remoto. –

risposta

16

v'è 2 ragione basical:

1) computer remoto non ha installato PowerShell

2) PSRemoting non è abilitata sul PC remoto (per consentirle di leggere il mio commento in si risponde)

+1

Enable-PSRemoting ha aiutato! – jrara

+0

PS: nel mio caso "Enable-PSRemoting" non è stato sufficiente, ho dovuto eseguire "Enable-WSManCredSSP -Role Server" per farlo funzionare. – expirat001

Problemi correlati