locked
Connecting to remote server failed with the following error message : WinRM cannot complete the operation RRS feed

  • Question

  •  

    when I run the following powershell script:

    $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"}

    Got this 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

    I have install winrm feature and execute "enable-psremoting -force".

    Anybody know how to fix it, thanks in advance.


    Awen

    Friday, March 14, 2014 7:52 AM

Answers

All replies