Alexander Zeitler

No more leaky abstractions

Fiddler Proxy Blocks Internet Connection After Logout

Geschrieben von Alexander Zeitler am 29. August 2014

Tags: englishfiddlerproxypowershell

You know the problem: after using Fiddler for a while (and not closing it), Windows is shutdown (especially if you’re using VMs) or somebody has logged into your computer and kicked your user. When returning to the computer, internet connection doesn’t work. A powershell script is here to help…

You also know the solution for this problem: Head over to Internet Explorer and remove the Fiddler propy. As this is a tedious task here is a powershell script, you can run at every login:

$regKey="HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$proxyServer = ""
Write-Host "Retrieving the proxy server ..."
$proxyServer = Get-ItemProperty -path $regKey ProxyServer -ErrorAction SilentlyContinue
Write-Host $proxyServer
    Write-Host "No Proxy set"
    Write-Host "Proxy is currenty enabled"
    Set-ItemProperty -path $regKey ProxyEnable -value 0
    Remove-ItemProperty -path $regKey -name ProxyServer
    Write-Host "Proxy is now disabled"

If you don’t want to change Script Execution policy for Powershell, you can also use this command line to run the Script above after you saved it as disableproxy.ps1

@powershell -NoProfile -ExecutionPolicy unrestricted .\disableproxy.ps1
blog comments powered by Disqus