Disabling proxy with PowerShell doesn't work, how can I achieve this?

A

Aaron Martin [am]

I am uninstalling an application which due to a bug sometimes enables the Windows Proxy setting in Windows 10. The PCs are distributed globally so I need to schedule a task to trigger after the uninstall (in case proxy gets enabled and network connection is lost) to check if the proxy is enabled then turn it off.

I have run the PowerShell code below to edit the registry while testing, and have found no other method to achieve this.

I have made sure all browsers are closed, I have refreshed services, and I have power cycled the machine.


Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyServer -Value ""
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyEnable -Value 0

I have confirmed that the registry setting reflects the changes above, but the GUI (through Settings or through Internet Explorer) still shows the proxy enabled and the network connection remains down unless I manually uncheck the box.

Where are these proxy settings actually stored, there must be some other place besides the registry value that everyone refers to. When I set a value for a fake proxy and port, these setting remain in the GUI whether enabled or disabled until changed, but the registry settings are never updated to those values. These settings MUST reside elsewhere. Anyone know where?


Continue reading...
 
Back
Top Bottom