2011-09-07 21 views
8

Ben ücra sunucuda aşağıdaki deyimi yürütme çalışıyorum:PowerShell: Invoke-Command kullanarak komutu yürütme hatası?

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

ancak bir hata mesajı alıyorum:

[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 

bu ve nasıl düzeltebilirim nedeni nedir?

+3

deneyin okumak etkinleştirme Uzak bilgisayarda Enable-PSRemoting yazarak. –

cevap

16

2 basical nedeni vardır:

1) uzak bilgisayar Powershell kurmamış

2) PSremoting uzak PC'de etkin değildir

(Bu cevap benim yorumunu)

+1

Enable-PSRemoting yardım etti! – jrara

+0

PS: Benim durumumda "Enable-PSRemoting" yeterli değildi, çalışmam için "Enable-WSManCredSSP -Role Server" dan sonra koşmam gerekiyordu. – expirat001

İlgili konular