If you need to set up a proxy on dozens of virtual machines or servers at once, clicking through network settings in Windows is a waste of time. Using the command line, PowerShell, and the registry, proxies can be configured in seconds, and the process can be easily automated with a script. In this article, we will explore three effective methods and show when to use each one.
Why configure a proxy via the command line
The graphical interface of Windows (“Settings → Network & Internet → Proxy”) is convenient for a single computer, but completely useless if you have 20 virtual machines on a VPS, a dozen RDP sessions for account farming, or a fleet of servers for scraping Wildberries and Ozon. In such cases, you need configuration without human intervention — through commands that can be embedded in a deployment script or batch file.
There is a second reason: in Windows, there are actually two independent proxy layers. One is used by browsers and most user applications (WinINet, Internet Options settings), while the other is used by system services, Windows Update, .NET applications, and console utilities (WinHTTP). Through the GUI, you only change the first layer. If your parser or script operates through the WinHTTP stack, browser settings will not affect it — you need the command netsh winhttp.
For arbitrageurs running Facebook Ads or TikTok Ads accounts through server environments without anti-detect browsers, and for SMM specialists automating posting through console tools, knowing these three methods saves hours of manual configuration.
netsh winhttp: system proxy for services and applications
The command netsh winhttp manages the proxy at the system level — this is the proxy that Windows services, most console utilities, .NET applications, and some parsers written without explicit proxy settings in the code see.
To set the proxy manually, open the command prompt as an administrator and execute:
netsh winhttp set proxy proxy-server="http=192.168.1.10:8080;https=192.168.1.10:8080" bypass-list="localhost;127.0.0.1"
If your proxy requires authentication with a username and password, WinHTTP cannot store credentials directly in this command — authentication must be passed either through headers in the application itself or by using a proxy without authentication by IP (whitelisting).
You can check the current settings with the command:
netsh winhttp show proxy
To reset the proxy and return to a direct connection:
netsh winhttp reset proxy
A handy feature: WinHTTP can import proxy settings directly from the browser's Internet Explorer/system settings, which is useful if you have already configured the proxy through the GUI and want to apply the same to services:
netsh winhttp import proxy source=ie
This method is great when you need to configure a proxy on a server Windows machine without GUI (Server Core) or to mass-apply the same proxy across all nodes via a deployment script.
PowerShell: automating proxy configuration
PowerShell provides more control: you can combine netsh, registry manipulation, and result verification in one script, and easily scale the configuration to hundreds of machines via Remote PowerShell or Invoke-Command.
Example of setting a system proxy via PowerShell with a netsh call:
$proxy = "192.168.1.10:8080"
netsh winhttp set proxy proxy-server="http=$proxy;https=$proxy" bypass-list="localhost"
Write-Host "Proxy set: $proxy"
Configuring the proxy for the current user directly through the registry using PowerShell (analogous to manual settings in the browser):
$regPath = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
Set-ItemProperty -Path $regPath -Name ProxyEnable -Value 1
Set-ItemProperty -Path $regPath -Name ProxyServer -Value "192.168.1.10:8080"
Set-ItemProperty -Path $regPath -Name ProxyOverride -Value "localhost;127.*;10.*"
To apply the changes immediately, without rebooting the system, you need to notify the system through the WinINet API. In pure PowerShell, this is done by calling functions from rundll32:
rundll32.exe wininet.dll,InternetSetOption 0 39 0 0
rundll32.exe wininet.dll,InternetSetOption 0 37 0 0
For bulk proxy configuration on a fleet of VPS machines (for example, for Instagram and TikTok account farming), it is convenient to wrap everything in one script and run it via Remote PowerShell:
$servers = @("vm1","vm2","vm3")
$proxy = "192.168.1.10:8080"
foreach ($s in $servers) {
Invoke-Command -ComputerName $s -ScriptBlock {
param($p)
netsh winhttp set proxy proxy-server="$p"
} -ArgumentList $proxy
}
This approach saves hours if you have a lot of machines for multi-accounting, where each needs its own proxy. For such tasks in arbitrage and SMM, residential proxies are usually chosen, as they provide real IPs of ordinary users and are less likely to raise suspicion with the anti-fraud systems of Facebook, TikTok, and Instagram.
Windows Registry: direct configuration of Internet Settings
All proxy settings for browsers and most user applications are physically stored in the registry branch HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings. Using the reg command, you can read and change these parameters directly from cmd — this is useful when PowerShell is unavailable or when you need to embed a command in an old batch script.
To enable the proxy and set the address via reg add:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d "192.168.1.10:8080" /f
To disable the proxy again:
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
To view the current value of the key:
reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer
An important nuance: the ProxyServer key in the old format is perceived as a single proxy for all protocols. If you need to set separate HTTP and HTTPS proxies, the value format should be: http=address:port;https=address:port.
For system (as opposed to user) proxies, the branch HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\DefaultConnectionSettings is used, but this binary key is more complicated to edit directly, so in practice, netsh winhttp is almost always used for system-level settings rather than direct registry editing.
Comparison of methods: when to use what
| Method | Level of action | When to use |
|---|---|---|
| netsh winhttp | System (services, .NET, WinHTTP clients) | Servers without GUI, Windows Update, parsers on WinHTTP |
| PowerShell | Any (combines netsh + registry) | Mass configuration on dozens of VMs, remote management |
| Registry (reg add) | User (browsers, WinINet applications) | Embedding in batch scripts, old systems without PowerShell |
In practice, most automation tasks for proxies for account farming or scraping are solved with a combination of all three methods: netsh winhttp for system services, the registry for the browser used manually by the SMM specialist, and PowerShell as the wrapper that executes everything on schedule.
Practical application scenarios
Farming advertising accounts for Facebook Ads and TikTok Ads. If you are not using an anti-detect browser and are deploying separate virtual machines for each account, the proxy on each VM needs to be set individually. A PowerShell script that substitutes its proxy from a list at machine startup saves time when scaling up to 30-50 accounts.
Scraping marketplaces. Server scripts for monitoring prices on Wildberries, Ozon, or Avito are often run as Windows services or scheduled tasks without an interactive desktop — this is exactly when a system proxy via netsh winhttp is needed, not browser settings.
SMM agencies. Managing 20-30 client accounts on Instagram and TikTok through separate RDP sessions requires binding a specific IP to each account. For such tasks, mobile proxies are often used — they trigger social media protection less frequently compared to data center IPs, as they appear as regular mobile connections.
Testing ads from different regions. Marketers checking how ads appear in Google Ads or Yandex.Direct for users from different countries only need to change the proxy with the netsh winhttp command and restart the test browser — without installing additional software.
For simple tasks like mass scraping, where high anonymity is not required but speed and stability are important, it is wiser to use data center proxies — they are cheaper and faster than residential ones, although they do not mask as well as real users.
Automatic proxy rotation script
If you have a list of proxies and need to periodically change the system proxy (for example, every 10 minutes to bypass rate limits while scraping), you can use a simple PowerShell script with a loop and delay:
$proxyList = @(
"proxy1.example.com:8080",
"proxy2.example.com:8080",
"proxy3.example.com:8080"
)
while ($true) {
foreach ($p in $proxyList) {
netsh winhttp set proxy proxy-server="$p"
Write-Host "Active proxy: $p"
Start-Sleep -Seconds 600
}
}
This same script can be easily adapted for rotation through the registry if your parser works specifically with WinINet browser settings rather than WinHTTP. The key point is to notify the system through rundll32 after changing the registry keys; otherwise, some applications will not pick up the new settings without a restart.
Common errors and their solutions
The proxy is set, but the application does not use it. Most often, the reason is that the application operates through WinINet (browser stack), while you have only configured netsh winhttp (system stack), or vice versa. Check both layers: netsh winhttp show proxy and the value of the ProxyServer key in the registry.
Changes in the registry do not apply without a reboot. This can be resolved by calling the InternetSetOption functions via rundll32.exe immediately after changing the keys — a system reboot is not required.
407 Proxy Authentication Required error. netsh winhttp does not support passing the username and password directly in the set proxy command. If the proxy provider requires authentication, use whitelisting by the server's IP address instead of a username and password, or pass authentication at the application level itself.
Windows security policies block registry changes. On corporate and some VPS images, group policies may prohibit writing to the Internet Settings branch. In this case, netsh winhttp remains a working option, as management through GPO is usually configured against user registry branches rather than the system WinHTTP proxy.
The reg add command executes, but the proxy does not turn on in the browser. Check that the ProxyEnable key is set to 1, not 0, and that the browser is not using its own independent proxy settings (this is typical for Chrome with the command line flag --proxy-server, which overrides system settings).
Conclusion
Configuring a proxy through the command line, PowerShell, and the Windows registry eliminates the need for manual clicks through settings on each machine and allows for complete automation of the process — whether it’s deploying 50 VMs for multi-accounting, configuring a marketplace scraper without a graphical interface, or mass-changing IPs for testing advertising campaigns. The key is to understand the difference between the system layer of WinHTTP and the user layer of WinINet; otherwise, the proxy will "not work for all applications."
If the task is related to farming advertising accounts or managing social media, where it is important for the IP to appear as natural as possible, it is worth considering residential proxies — they reduce the risk of blocks when working with Facebook, Instagram, and TikTok. For less demanding tasks like scraping or testing scripts, faster and more affordable data center proxies are suitable, which are easier to integrate into automated scripts through the commands described above using netsh and PowerShell.