is it possible to change IE proxy settings from command line

According to this MSDN article:

Internet Explorer Command Line Options

there is no way to change Internet Explorer's proxy settings via the command line.


IE proxy settings are controlled via registry keys. In general you should change them manually since this implementation detail can change between versions. However, as a debugging tool its useful.

Anyway, you can change registry keys from the command line using the REG command. Specifically, I would just create some .reg files with the various states you want to change to and do REG IMPORT example-file.reg. Or, failing that, REG ADD.


proxycfg might be the tool you are looking for.

C:\>proxycfg /?
Microsoft (R) WinHTTP Default Proxy Configuration Tool
Copyright (c) Microsoft Corporation. All rights reserved.

usage:

    proxycfg -?  : to view help information

    proxycfg     : to view current WinHTTP proxy settings

    proxycfg [-d] [-p <server-name> [<bypass-list>]]

        -d : set direct access
        -p : set proxy server(s), and optional bypass list

    proxycfg -u  : import proxy settings from current user's
                   Microsoft Internet Explorer manual settings (in HKCU)

It works well in windows XP
In next windows versions, you can use:

C:\>netsh winhttp import proxy source=ie

to import proxy settings from Internet Explorer and

C:\>netsh winhttp reset proxy

to reset proxy settings for more help, use:

C:\>netsh winhttp /?

But these changes might not get reflected in Internet Explorer. Nonetheless, you should be able to use proxy in command line applications.


you could also make it via powershell:

<#
.Synopsis
This function will set the proxy settings provided as input to the cmdlet.
.Description
This function will set the proxy server and (optinal) Automatic configuration script.
.Parameter ProxyServer
This parameter is set as the proxy for the system.
Data from. This parameter is Mandatory
.Example
Setting proxy information
Set-InternetProxy -proxy "proxy:7890"
.Example
Setting proxy information and (optinal) Automatic Configuration Script 
Set-InternetProxy -proxy "proxy:7890" -acs "http://proxy:7892"
#>

Function Set-InternetProxy {
    [CmdletBinding()]
    Param(      
        [Parameter(Mandatory = $True, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [String[]]$Proxy,

        [Parameter(Mandatory = $False, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)]
        [AllowEmptyString()]
        [String[]]$acs               
    )

    Begin {
        $regKey = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"      
    }   
    Process {
        Set-ItemProperty -path $regKey ProxyEnable -value 1
        Set-ItemProperty -path $regKey ProxyOverride -Value "<local>"
        Set-ItemProperty -path $regKey ProxyServer -value $proxy                        
        if ($acs) {                    
            Set-ItemProperty -path $regKey AutoConfigURL -Value $acs          
        }
    }    
    End {
        Write-Output "Proxy is now enabled"
        Write-Output "Proxy Server : $proxy"
        if ($acs) {       
            Write-Output "Automatic Configuration Script : $acs"
        }
        else {           
            Write-Output "Automatic Configuration Script : Not Defined"
        }
    }
}

you could find the reference here Set-InternetProxy : Enable proxy with PowerShell