Windows Update fails: Proxy Authentication Required

Today a colleague mentioned that 2 servers failed to connect to our new WSUS server. When I start Windows Update manually I get a prompt asking for a username and password. This is not the normal behaviour to do.

I looked in the file WindowsUpdate.log and there I found this error:

WARNING: GetAuthorizationCookie failure, error = 0x8024401B, soap client error = 10, soap error code = 0, HTTP status code = 407

Specially HTTP status code = 407 is interesting, which means Proxy Authentication Required. Recently we moved our computers in the same network as our parent company  and in that network is a proxy server. Which requires user authentication. After the move my colleague made a group policy for Internet Explorer so that it will not use the proxy server. I expected that the Windows Update client would use the same settings. But this is not the case. Windows Update uses the WinHTTP protocol and has a separate configuration for proxies.

I searched Google and found that you can use a proxycfg.exe to configure proxy for WinHTTP. This tool is for older Windows versions. For newer Windows versions you can use netsh commands.

To fix the problem I typed the next command from the command prompt.

netsh winhttp import proxy source=ie

This command imports the proxy settings from Internet Explorer. It was the easiest way to do. You will need to restart the Windows Update services for the changes to have effect.