当我运行下面的 powershell  脚本时:

$FarmAcct = 'domain\user' 
$secPassword = ConvertTo-SecureString 'aaa' -AsPlaintext -Force 
$global:farmCredential_ = New-Object System.Management.Automation.PsCredential $FarmAcct,$secPassword
Invoke-Command -ComputerName "172.21.4.14" -Credential $global:farmCredential_ -Scriptblock { write-host "HELLO"}

得到下面的error:

Connecting to remote server 172.21.4.14 failed with the following error message : WinRM cannot 
complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the 
network, and that a firewall exception for the WinRM service is enabled and allows access from this computer. By 
default, the WinRM firewall exception for public profiles limits access to remote computers within the same local 
subnet. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OpenError: (172.21.4.14:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : WinRMOperationTimeout,PSSessionStateBroken

我已经安装了 winrm feature 并且执行了 "enable-psremoting -force".

解决方法:

 

运行 netsh winhttp show proxy 看是否有proxy,如果有用 netsh winhttp reset proxy 重置下,就好了。

 

http://www.ldap389.info/en/2011/04/14/the-winrm-client-cannot-complete-the-operation-within-the-time-specified/

WinRM不起作用 Connecting to remote server failed with the following error message : WinRM cannot complete the operation的更多相关文章

  1. ionic真机调试Android报错 - could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon

    在使用真机调试Android程序时,报错如下: could not read ok from ADB Server * failed to start daemon error: cannot con ...

  2. Appium——adb 启动问题Invalid argument: cannot open transport registration socketpair could not read ok from ADB Server failed to start daemon * error: cannot connect to daemon

    adb启动问题:Invalid argument: cannot open transport registration socketpair could not read ok from ADB S ...

  3. nova instance出错:"message": "Proxy error: 502 Read from server failed

    执行 $ nova resize instance1 时候出错: {, "details": " File \"/opt/stack/nova/nova/com ...

  4. “psql: could not connect to server: Connection refused” Error when connecting to remote database

    问题: I am trying to connect to a postgres database installed in a remote server using the following c ...

  5. selenium Remote Server 实现原理

    selenium作为一个出色的web automation框架,被越来越多的企业采用究其原因,框架设计的比较remarkable, 作为一个开源的框架,能够开辟出一套协议,以至于针对app测试的app ...

  6. CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.

    今天,在用icinga服务器端测试客户端脚本时,报如下错误: [root@mysql-server1 etc]# /usr/local/icinga/libexec/check_nrpe -H 192 ...

  7. System.Net.WebException : The remote server returned an error: (415) UNSUPPORTED MEDIA TYPE

    I am having problems with a bit of code that accesses a restful web service. Running this code, it e ...

  8. Call Azure Queue get "The remote server returned an error: (400) Bad Request."

    这几天开始研究Windows Azure, 在使用Azure Queue 的时候,CreateInfNotExists 总是抛出异常 "The remote server returned ...

  9. Request Connection: Remote Server @ 192.229.145.200:80

    录制Loadrunner脚本时,提示: Request Connection: Remote Server @ 192.229.145.200:80   NOT INTERCEPTED!(REASON ...

随机推荐

  1. Codeforces 718C solution

    C. Sasha and Array   time limit per test :  5 seconds memory limit per test :  256 megabytes Descrip ...

  2. 在线排错之curl命令详解

    春回大地万物复苏,好久不来,向各位博友问好. 简介 cURL是一个利用URL语法在命令行下工作的文件传输工具,1997年首次发行.它支持文件上传和下载,所以是综合传输工具,但按传统,习惯称cURL为下 ...

  3. 轮廓(Outline) 实例

    1.在元素周围画线本例演示使用outline属性在元素周围画一条线. <style type="text/css"> p{border:red solid thin;o ...

  4. GlusterFS分布式存储集群部署记录-相关补充

    接着上一篇Centos7下GlusterFS分布式存储集群环境部署记录文档,继续做一些补充记录,希望能加深对GlusterFS存储操作的理解和熟悉度. ======================== ...

  5. Segment Occurrences(string find函数)

    Description You are given two strings s and t, both consisting only of lowercase Latin letters.The s ...

  6. QQ使用的使用评价

    1:界面以及功能:打开软件之后探出登录窗口,基本功能的登录,找回密码,注册帐号等功能均在比较醒目的位置,界面较为友好. 将注册帐号放在打开软件的第一界面当然是正确的选择,给予用户非常直观的提示(没有帐 ...

  7. [Beta阶段]展示博客

    一.团队成员简介与个人博客地址 团队博客地址:http://www.cnblogs.com/wowotoubuaa/ 江昊,项目经理http://www.cnblogs.com/haoj/ 王开,后端 ...

  8. 《Linux内核设计与实现》第四章学习笔记

    <Linux内核设计与实现>第四章学习笔记           ——进程调度 姓名:王玮怡  学号:20135116 一.多任务 1.多任务操作系统的含义 多任务操作系统就是能同时并发地交 ...

  9. 《Linux内核分析》第六周学习笔记

    <Linux内核分析>第六周学习笔记 进程的描述和创建 郭垚 原创作品转载请注明出处 <Linux内核分析>MOOC课程http://mooc.study.163.com/co ...

  10. 语音笔记:CTC

    CTC全称,Connectionist temporal classification,可以理解为基于神经网络的时序类分类.语音识别中声学模型的训练属于监督学习,需要知道每一帧对应的label才能进行 ...