none
The WinRM service is unable to start because of a failure during initialization

    Question

  • I have a server where WINRM was running previously and recently stopped. This is a Windows 2008 R2 standard box running IIS (the WinRM IIS module is not installed).

    In the System event log:

    The WinRM service is unable to start because of a failure during initialization. 

     Additional Data 
     The error code is 234.

    In the Windows Remote Management Operational event log:

    The WinRM service is unable to start because of a failure during initialization. The error code is 14

    If I try to run winrim quickconfig:

    WinRM is not set up to receive requests on this machine.
    The following changes must be made:


    Start the WinRM service.


    Make these changes [y/n]? y


    WinRM has been updated to receive requests.


    WinRM service started.
    WSManFault
        Message = The client cannot connect to the destination specified in the request. Verify that the service 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".

    Error number:  -2144108526 0x80338012
    The client cannot connect to the destination specified in the request. Verify that the service 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".

    I have spent plenty of time reading google links and forum posts for things similar to this but nothing has helped so far and I'm hoping someone on the forum has run across this issue or knows how to reset WINRM to the default config so I can get it started again.

    Wednesday, March 07, 2012 4:53 PM

Answers

  • A registry key was added to HKLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters that was mistakenly set to REG_QWORD when it should be REG_DWORD which was causing the winrm service to be unable to start. Changed it to REG_DWORD and all is well.
    • Marked as answer by Adam Weigert Thursday, March 08, 2012 7:08 PM
    • Edited by Adam Weigert Thursday, March 08, 2012 7:09 PM
    Thursday, March 08, 2012 7:08 PM

All replies

  • Hi Adam,

    I guess the first thing to do would be to check the WinRM listener configuration with the following command:

    winrm enumerate winrm/config/listener

    It should look something like this:

    Listener
        Address = *
        Transport = HTTP
        Port = 5985
        Hostname
        Enabled = true
        URLPrefix = wsman
        CertificateThumbprint
        ListeningOn = 10.9.1.2, 127.0.0.1, ::1, fe80::100:7f:fffe%13, fe80::5efe:10.9.31.248%12, fe80::28e1:a010:a14:7c2f%11

    You can verify if this is behaving with netstat using the following command:

    netstat -an | findstr /i "5985.*list"

    If you feel the need to trash the listener and start again because you simply don't trust it,  you can do this with the following command:

    winrm delete winrm/config/listener

    After which you can re-run the original winrm qc command to re-create the listener. Also make sure the firewall rule exists to allow traffic inbound.

    Cheers,
    Lain

    Thursday, March 08, 2012 10:09 AM
  • The service won't even start so I can't use any winrm commands other than quickconfig which tries to start the service that then fails. I've opened a PSS case, so assuming they are able to resolve this issue for me I'll post the resolution for others.
    Thursday, March 08, 2012 3:15 PM
  • A registry key was added to HKLM\SYSTEM\CurrentControlSet\Services\HTTP\Parameters that was mistakenly set to REG_QWORD when it should be REG_DWORD which was causing the winrm service to be unable to start. Changed it to REG_DWORD and all is well.
    • Marked as answer by Adam Weigert Thursday, March 08, 2012 7:08 PM
    • Edited by Adam Weigert Thursday, March 08, 2012 7:09 PM
    Thursday, March 08, 2012 7:08 PM
  • I had a similar situation here, instead I had a REG_SZ value which was keeping the WinRM service from starting. - Thanks

    Thursday, October 31, 2013 2:38 PM
  • I have the same problem with WinRM but I do not have any Parameter in Service HTTP/Parameters. Could you provide the name of the key and its expected value. Perhaps by adding this key manually I can overcome the issues I am facing. Thanks!
    Friday, December 20, 2013 2:17 PM
  • Hi Acacias.f,

    I've encountered the same problem as you on a bunch of servers. Do you know where these REG_SZ values came from in your case? I suspect a service pack or hotfix which creates values based on the default rather than correctly specifiying the DWORD type.

    Any ideas,

    Thanks

    Monday, January 13, 2014 12:44 PM
  • Hello All,

    Please share if you have any working solution for this issue?

    Mahesh

    Monday, August 04, 2014 3:03 AM
  • I had same issue. Someone had set the reg add commands wrong for increasing the IIS header.

    Resolved setting this.

    Reg Add HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters /v MaxFieldLength /t REG_DWORD /d 65534

    Reg Add HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters /v MaxRequestBytes /t REG_DWORD /d 16777216

    The value may be different for you. It is what we increased our value to.

    Wednesday, August 27, 2014 3:32 PM
  • Thank you Adam Weigert and CTharp !

    Have a nice day !!!

    Tuesday, September 30, 2014 6:34 AM
  • I was pulling my hair out over this. This worked for me as well!
    Monday, May 15, 2017 8:13 PM
  • Perfect.  Worked for me !  Thanks Internet.
    Wednesday, May 24, 2017 6:00 PM
  • Thanks! Worked for me
    Monday, July 03, 2017 10:38 PM