zoukankan      html  css  js  c++  java
  • WinRM不起作用 Connecting to remote server failed with the following error message : WinRM cannot complete the operation

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

    $FarmAcct = 'domainuser' 
    $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/

  • 相关阅读:
    (23)odoo中的domain表达式
    (11)lambda表达式用法
    (22)odoo 安装旧模块报错处理
    (21)odoo中的QWeb模板引擎
    (10)列表操作
    (09)异常处理
    (08)文件与目录
    (07)内存使用和变量赋值
    (06)正则表达式
    vue router路由(三)
  • 原文地址:https://www.cnblogs.com/fengwenit/p/3606927.html
Copyright © 2011-2022 走看看