How to set AutoProxy on server core?

Anthony Hunter 11 Reputation points
2020-09-14T17:07:34.397+00:00

I need to configure the autoproxy for my server, but I can't find the right command line or reg settings to give my machine internet access on my companies network.
We normally set this through "Internet Options|Local Area Network Settings" on our other machines.

Any help will be appreciated. Thanks!

Anthony

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,083 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Candy Luo 12,656 Reputation points Microsoft Vendor
    2020-09-15T06:12:58.94+00:00

    Hi ,

    We can use netsh winhttp set proxy to configure the proxy settings for a server core.

    Configure your server to use a proxy server:

    netsh Winhttp set proxy <servername>:<port number>  
    

    For example: netsh winhttp set proxy 10.0.0.6:8080

    To reset the winhttp proxy, enter the following command and press Enter:

    netsh winhttp reset proxy  
    

    For detailed information, please refer to the link below:

    Quick Reference for Server Core Tasks

    Best Regards,

    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Candy Luo 12,656 Reputation points Microsoft Vendor
    2020-09-17T02:33:23.337+00:00

    Hi ,

    Please use the following script:

    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://pac.mycompany/mycompany/filtering.pac" /f  
    

    As the picture below:

    25316-image.png

    To clear that field:

    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f  
    

    If you want to use PowerShell, you can run the cmdlet below:

    Set-ItemProperty -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name AutoConfigURL -Value 'http://www.yourdomain.com/config.pac'  
    

    25317-image.png

    Best Regards,

    Candy


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  3. Øistein 1 Reputation point
    2021-01-19T16:09:52.277+00:00

    Hello,

    I am facing the same problem, using Windows Server Core 2019 as well.
    "Normal" proxy can be configured via:
    netsh winhttp set proxy <proxy>:<port>

    Reset with:
    netsh winhttp reset proxy

    However, when trying to use a .pac file (automatic configuration file), the server seems to ignore the settings.
    I have tried setting this via the registry via Group Policy Management Console, same way we do on servers with GUI.
    The values are registered in the registry, however they do not seem to have any effect.

    Would be nice if someone knows how to make this work.

    regards,
    Øistein

    0 comments No comments