Skip to content

Instantly share code, notes, and snippets.

@mkropat
Created January 15, 2015 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mkropat/85ac76202a72839d955f to your computer and use it in GitHub Desktop.
Save mkropat/85ac76202a72839d955f to your computer and use it in GitHub Desktop.
$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'
@ioir-ir
Copy link

ioir-ir commented Mar 8, 2024

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment