Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Netsh Commands for Windows Hypertext Transfer Protocol (WINHTTP)

Updated: February 8, 2008

Applies To: Windows Server 2008

You can use commands in the netsh winhttp context to configure proxy and tracing settings for Windows HTTP. The Netsh commands for winhttp can be run manually at the netsh prompt or in scripts and batch files.

To run these commands from the command prompt, you must either enter the netsh winhttp context or prepend the context to the command. For example, if you are at the command prompt but have not typed netsh and then winhttp to enter the netsh winhttp context, you must type:

netsh winhttp command

Where command is the command that you want to run, including all of the required parameters for the command.

For information on how to interpret netsh command syntax, see Formatting Legend.

This section contains the following commands:

The following entries provide details for each command.

Flushes the internal buffers for the log files.

flush loggbuffer

Imports the proxy settings in the Internet Explorer Web browser's Internet Options. Importing settings from IE is the only available option

import proxy source =ie

Resets the WinHTTP proxy setting to DIRECT.

reset proxy

Resets the WinHTTP trace parameters to the default settings.

reset tracing

Following are the default WinHTTP trace parameters:


Parameter Value
Tracing State

Configures the WinHTTP proxy setting.

set proxy [proxy-server=] ProxyServerName [bypass-list=] <HostsList>

Required. Specifies the proxy server to use for http, secure http (https), or both http and https protocols.

Optional. Specifies a list of Web sites that should be visited without utilizing the proxy server. Use "<local>" to bypass all short name hosts.

Following are three examples of how to use the set proxy command.

set proxy myproxy
set proxy myproxy:80 "<local>bar"
set proxy proxy-server="http=myproxy;https=sproxy:88" bypass-list="*.contoso.com"

Configures the WinHTTP tracing parameters.

set tracing [output=] file | debugger | both [trace-file-prefix=] FilePrefix [level=] default | verbose [format=] ansi | hex [max-trace-file-size=] FileSize [state=] enabled |disabled


Optional. Specifies whether tracing data is exported to a file, a debugger, or both.

Optional. Specifies a string value that is a prefix for the log file. The file prefix can include a folder location/path. Type "*" to delete an existing prefix.

Optional. Specifies the amount of information to log.

Optional. Specifies the display format of network traffic (hexadecimal or ansi).

Optional. Specifies a numeric value that is the maximum size of the trace file in bytes.

Required. Specifies whether tracing is enabled or disabled.


Following are two examples of how to use the set tracing command.

set tracing trace-file-prefix="C:\Temp\Test3" level=verbose format=hex
set tracing output=debugger max-trace-file-size=512000 state=enabled

Displays the current WinHTTP proxy setting.

show proxy

Displays the current WinHTTP tracing parameters.

show tracing

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft