SysTutorials

Configure Windows Proxy Settings via Command Line

· updated May 17, 2026

For any current Windows system, netsh winhttp is the standard command-line tool for proxy configuration. WinHTTP handles system-level proxy settings used by Windows Update, built-in applications, and services that don’t rely on browser-specific configuration.

Set a proxy with bypass list

netsh winhttp set proxy proxy-server="proxy.example.com:8080" bypass-list="localhost;127.0.0.1;*.internal.local"

Use semicolons to separate multiple proxy servers or bypass entries. Wildcards are supported for domain patterns (e.g., *.internal.local matches all subdomains).

View current settings

netsh winhttp show proxy

This displays the active proxy server and bypass list for WinHTTP.

Reset to direct connection

netsh winhttp reset proxy

This removes all proxy configuration and routes traffic directly.

Legacy Internet Explorer Configuration (Registry-Based)

If you’re maintaining older systems with Internet Explorer, direct registry modification is the most reliable approach. Modern SetProxy utilities are unsupported.

Enable proxy in IE

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d "proxy.example.com:8080" /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f

The /f flag forces the operation without prompting.

Disable IE proxy

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f

Set exceptions (bypass list) in IE

reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "localhost;127.0.0.1;*.local" /f

Use semicolons to delimit entries.

Migrating IE Settings to WinHTTP

On Windows 7 or later, import existing IE proxy configuration into WinHTTP:

netsh winhttp import proxy source=ie

This copies IE’s proxy settings to the system-wide WinHTTP configuration. Useful when transitioning from browser-level to system-level proxy handling.

Verifying Proxy Configuration

Check WinHTTP settings

netsh winhttp show proxy

Query IE registry settings

reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable
reg query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride

Key Differences: WinHTTP vs Internet Explorer

Advanced Proxy Configuration

Authenticated proxies

Command-line tools don’t directly support proxy authentication credentials. Instead, use one of these approaches:

Domain environments

In Active Directory domains, use Group Policy to manage proxy settings centrally:

Multiple proxy servers

Specify different proxies for different protocols:

netsh winhttp set proxy proxy-server="http=proxy1.com:8080;https=proxy2.com:8443;ftp=proxy3.com:3128"

Bypass lists with wildcards

Separate entries with semicolons. Wildcards work with leading asterisks:

netsh winhttp set proxy proxy-server="proxy.example.com:8080" bypass-list="localhost;127.0.0.1;*.internal.local;*.dev;10.0.0.0/8"

Automation and Scripts

For scripted deployment, wrap netsh or reg commands in batch files or PowerShell:

# PowerShell example
$proxy = "proxy.example.com:8080"
$bypass = "localhost;127.0.0.1;*.internal.local"
netsh winhttp set proxy proxy-server=$proxy bypass-list=$bypass

For bulk deployment across multiple machines, use Configuration Management tools (Ansible, Puppet, Chef) or System Center Configuration Manager (SCCM).

2026 Comprehensive Guide: Best Practices

This extended guide covers Configure Windows Proxy Settings via Command Line with advanced techniques and troubleshooting tips for 2026. Following modern best practices ensures reliable, maintainable, and secure systems.

Advanced Implementation Strategies

For complex deployments, consider these approaches: Infrastructure as Code for reproducible environments, container-based isolation for dependency management, and CI/CD pipelines for automated testing and deployment. Always document your custom configurations and maintain separate development, staging, and production environments.

Security and Hardening

Security is foundational to all system administration. Implement layered defense: network segmentation, host-based firewalls, intrusion detection, and regular security audits. Use SSH key-based authentication instead of passwords. Encrypt sensitive data at rest and in transit. Follow the principle of least privilege for access controls.

Performance Optimization

Troubleshooting Methodology

Follow a systematic approach to debugging: reproduce the issue, isolate variables, check logs, test fixes. Keep detailed logs and document solutions found. For intermittent issues, add monitoring and alerting. Use verbose modes and debug flags when needed.

These tools complement the techniques covered in this article:

Integration with Modern Workflows

Modern operations emphasize automation, observability, and version control. Use orchestration tools like Ansible, Terraform, or Kubernetes for infrastructure. Implement centralized logging and metrics. Maintain comprehensive documentation for all systems and processes.

Quick Reference Summary

This comprehensive guide provides extended knowledge for Configure Windows Proxy Settings via Command Line. For specialized requirements, refer to official documentation. Practice in test environments before production deployment. Keep backups of critical configurations and data.

← All posts