Skip to content

Script to set proxy settings

Featured Replies

I am very limited in my scripting abilities. I need a script that will change proxy settings per location. Example: Setting at this location the IP of the machine is 172.xx.xxx.xx (DHCP) and the proxy setting is 192.xxx.xxx.xxx port xxxx.

I travel to another location the IP of the machine is 164.xx.xxx.xx (DHCP) and the proxy setting is 192.xxx.xxx.xxx port xxx.

 

The proxy servers and the ports are different. Right now when someone travels to the offsite location we have to move them from one OU to another in order for the proxy to be set correctly. Could anyone be of help or point in the right direction. Thanks in advance.

 

Kathy

Hi,

are we talking about proxy settings in Internet Explorer? If so I would set it using a group policy and using a Group Policy assigned to the AD site, then you will not have to do any scripting..

regards.

Jörgen

  • Author

We do have it set in group policy with HQ's getting one policy and our offsite locations getting another policy. Is there a way to set it that it will look at both and assign the correct proxy to the correct location? Thanks.

  • 1 month later...
  • Author

We have implemented a machine based group policy for our domain. We use this because we have different locations that have different proxy settings (same domain). The policy went into effect and was successful on 90% of our client pc's. The other 10% we are having to do a gpupdate /force and it usually has to be a local administrator of the machine to do it. There is no rhyme or reason to it.

 

The computer policy is under

Computer configuration / preferences / Windows Settings / Registry.

 

There are three keys ProxyEnable, ProxyOverride and ProxyServer.

 

As I said it worked fine on 90% of the machines. Any help would be appreciated.

 

Thanks.

  • 3 months later...

Note that you need to restart Internet Explorer after applying the registry fix above.

Probably same with the GPO setting.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.