Scripting : Toggle proxy server in IE settings with PowerShell

My current Customer use a proxy server for Internet and I need to change this settings each morning (when I start to work for him) and each evening (when I return at home). To save precious time, I wrote a little script that toggle this setting at each script execution :

 $regKey="HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
$proxyServer = ""

$proxyServerToDefine = "{Proxy}:{Port}"
Write-Host "Retrieve the proxy server ..."

$proxyServer = Get-ItemProperty -path $regKey ProxyServer -ErrorAction SilentlyContinue
Write-Host $proxyServer
if([string]::IsNullOrEmpty($proxyServer))
{
    Write-Host "Proxy is actually disabled"
    Set-ItemProperty -path $regKey ProxyEnable -value 1
    Set-ItemProperty -path $regKey ProxyServer -value $proxyServerToDefine
    Write-Host "Proxy is now enabled"
}
else
{
    Write-Host "Proxy is actually enabled"
    Set-ItemProperty -path $regKey ProxyEnable -value 0
    Remove-ItemProperty -path $regKey -name ProxyServer
    Write-Host "Proxy is now disabled"
}

Hope this helps!