Apr 14 2011

The WinRM client cannot complete the operation within the time specified.

After configuring WinRM on a Windows 2008R2 server we launched the following command in order to test the installation:

winrm id -r:%machinename%

Unfortunately we had this error message:

WSManFault Message = The WinRM client cannot complete the operation within the time specified. Check if the machine name is valid and is reachable over the network and firewall exception for Windows Remote Management service is enabled.

It was not a connectivity issue because we checked the 5985 port using telnet. We followed the troubleshooting steps described in this post and this technet article. Everything looked ok, no lead so far… So we had a look at the eventlog, and we noticed the following error:

The Event ID 128 in the “Windows Remote Management/Operational” log displays an ERROR_WINHTTP_TIMEOUT. We decided to capture network traffic with WireShark and use the HTTP display filter:

We were a bit confused when we realized that all the HTTP traffic was forwarded on the 8080 port of a proxy server which was on an unreachable subnet… So we launched the following netsh for Windows HTTP command:

netsh winhttp show proxy

And the result speaks for itself:

We were not aware that the server, which was in fact a virtual machine, was deployed with a template having this particular configuration. We did reset this setting using the command:

netsh winhttp reset proxy

WinRM now works like a dream, by the way WinRM clients can be configured to use a proxy server, but that was not what we wanted to achieve at all…

This post is also available in: French

14 Comments

  • By Mrrouxsterfull, August 29, 2011 @ 11:32 am

    IT WORKS, Finally, after three days of searching for a solution, now im very grumpy, whish id seen this post earlier.
    Thank You

  • By Matthew Huynh, January 6, 2012 @ 6:13 pm

    Worked like a charm. Thanks.

  • By ldap389, January 6, 2012 @ 11:02 pm

    You are welcome, glad this post sorted your problem out

  • By Aaron R, July 23, 2012 @ 3:42 pm

    Wow thank you.

  • By Giles Guthrie, August 9, 2012 @ 2:03 pm

    This fixed my issue with Exchange 2010 Management Console not connecting to its own forest. Thank you.

  • By mansoor, June 16, 2014 @ 7:38 am

    same problem but I don’t have proxy server…

    direct access (no proxy server)

  • By Dilip, November 20, 2015 @ 4:37 pm

    Thanks a lot for this post 🙂

  • By dan, December 7, 2015 @ 6:20 pm

    worked!!! Thank you kindly

  • By Nasmal, December 14, 2015 @ 9:34 am

    Thanks. This worked for the mailbox servers . In CAS servers it is connecting to the Mailbox servers perfectly but showing error connecting to the same CAS servers

  • By Saleem, April 28, 2016 @ 12:28 pm

    Thanks a lot, fixed our issue after running netsh winhttp reset proxy. Contacted Microsoft Support and the case is still open and they are still struggling from last 4 days to fix it.

  • By jalil, August 9, 2017 @ 4:01 am

    salaam,

    thanks for the advice, it work for me.

    best regard’s

  • By ldap389, August 28, 2017 @ 10:43 pm

    Happy to help 🙂

  • By Freenet, December 13, 2017 @ 9:39 pm

    Thank you, we have changed the winhttp because Windows Updates refused to work, this messed up our EMC, didn’t realised why… but now it is solved

  • By Pavan, May 16, 2019 @ 3:40 pm

    Great Trick, good command, really superb work sirji,
    Thank U
    So Much…

Other Links to this Post

RSS feed for comments on this post. TrackBack URI

Leave a comment

*

WordPress Themes

Blossom Icon Set

Software Top Blogs