discoveranother Posted August 23, 2018 Posted August 23, 2018 Hi all, We no longer use proxy settings on a Windows 2008 R2 Server, but unfortunately having removed any policies showing proxy settings when users login they still get proxy settings. I have searched high and low, ran gpresult /r on systems to check which policies are being picked up and still users are getting proxy settings. They also have no scripts configured on logins within ADUC. Just wondered if someone could provide a .vbs script for the moment that I can put into the netlogon folder and apply to ADUC for users or add this script into Group Policy that prevents proxy settings from being enabled until I try to resolve this. Thanks guys for any help.
dloudon96 Posted August 23, 2018 Posted August 23, 2018 Have you tried running a del prof on the machine to delete the users profile and seeing if that works? Dan
PD1279 Posted August 23, 2018 Posted August 23, 2018 Deleting a profile is a bit major for this, as all settings for everything will be lost. I have a batch file which removes Proxy settings, just add the following lines to your own vbs script. >>> DisableProxy() Function DisableProxy() 'Set Internet to NOT use a proxy server Set WSHShell = CreateObject("WScript.Shell") WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0 ,"REG_DWORD" WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", " ", "REG_SZ" WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride", " ", "REG_SZ" End Function Wscript.Sleep 2000 WScript.quit <<< Another way is to add it in to GPO with a delete setting, don't just take the setting away from GPO unless it had the setting to "remove this item when it is no longer applied" is ticked 1
discoveranother Posted August 23, 2018 Author Posted August 23, 2018 (edited) Deleting a profile is a bit major for this, as all settings for everything will be lost. I have a batch file which removes Proxy settings, just add the following lines to your own vbs script. >>> DisableProxy() Function DisableProxy() 'Set Internet to NOT use a proxy server Set WSHShell = CreateObject("WScript.Shell") WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0 ,"REG_DWORD" WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer", " ", "REG_SZ" WSHShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride", " ", "REG_SZ" End Function Wscript.Sleep 2000 WScript.quit <<< Another way is to add it in to GPO with a delete setting, don't just take the setting away from GPO unless it had the setting to "remove this item when it is no longer applied" is ticked I have used delprof before to remove profiles which has helped in the past elsewhere, but not on staff profiles where they may be holding a lot of data and that would be wiped. I may try the script above to see if it works. I'm not using a script of any kind at the moment. Thanks. Edited August 23, 2018 by discoveranother
PD1279 Posted August 24, 2018 Posted August 24, 2018 I would also look at putting the delete entries into GPO and then you don't have to worry about running a script at all then. Shout if you want the details and I'll put some screen shots together for you Ciao
AlanD Posted August 24, 2018 Posted August 24, 2018 While proxy can be set via GPO - it can be set using DHCP and DNS with wpad ...in fact these are more likely means of setting proxy because then they apply to non PC devices too.
Davit2005 Posted August 24, 2018 Posted August 24, 2018 I've used Group Policy Preferences to set registry entires before for proxy settings you could use these to remove the settings.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now