How to modify LAN Proxy Exception List via Powershell
Example of the Powershell script which can modify IE LAN Proxy Exception List to keep current settings (for example pulled by GPO) and extend with custom exception list.Most important is to modify first line.
Script:
$ProxyExceptionList = ";*.google.com;*.microsoft.com"
$ProxyProperty = Get-ItemProperty "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
If ($ProxyProperty.ProxyOverride) {
$OldValue = $ProxyProperty.ProxyOverride
$NewValue = $OldValue+$ProxyExceptionList
$ProxyProperty | Set-ItemProperty -Name ProxyOverride -Value $NewValue
} else {
Write-Warning "Proxy overrides not set!"
}
Historical Comments
These comments were imported from the original WordPress post.
Chris Randle — August 29, 2023 at 13:33
Nice code but would be better to check if the value already exists. This adds duplicates to the Proxy Exception list.