Created
January 15, 2015 20:10
-
-
Save mkropat/85ac76202a72839d955f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$setProxy = { | |
param($proxy) | |
Set-Location 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' | |
Set-ItemProperty . ProxyServer $proxy | |
Set-ItemProperty . ProxyOverride '<local>' | |
Set-ItemProperty . ProxyEnable 1 | |
} | |
# You can run $setProxy as another user like so: | |
# | |
# Start-Job -Credential (Get-Credential) -ScriptBlock $setProxy -ArgumentList '1.2.3.4:1337' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Set-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings' -Name 'ProxyServer' -Value 'http=wsa2.xxxx.org:4358;https=wsa2.xxxx.org:4358;ftp=wsa2.xxxx.org:4358'