2011-09-07 5 views
8

मैं दूरदराज के सर्वर पर निम्न कथन निष्पादित करने के लिए कोशिश कर रहा हूँ:पावरशेल: Invoke-Command का उपयोग करके आदेश निष्पादित करने में त्रुटि?

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

लेकिन मैं एक त्रुटि संदेश मिलता है:

[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 

इस और इसे ठीक करने के लिए क्या कारण है?

+3

कोशिश पढ़ सक्षम करने के लिए रिमोट कंप्यूटर में सक्षम-पीएसआरमोटिंग टाइपिंग। –

उत्तर

16

वहाँ 2 basical कारण है:

1) दूरस्थ कंप्यूटर Powershell नहीं स्थापित किया है

2) PSremoting दूरदराज के पीसी पर सक्षम नहीं है (यह मेरी टिप्पणी आप में जवाब देने के)

+1

सक्षम-PSRemoting मदद की! – jrara

+0

पीएस: मेरे मामले में "सक्षम-पीएसआरमोटिंग" पर्याप्त नहीं था, मुझे काम करने के लिए "सक्षम-WSManCredSSP -Role सर्वर" के बाद भागना पड़ा। – expirat001

संबंधित मुद्दे