Skip to content

Instantly share code, notes, and snippets.

@bdwyertech
Last active March 3, 2023 15:24
Show Gist options
  • Save bdwyertech/cac234b64fe56fa3d11a81c141e379f8 to your computer and use it in GitHub Desktop.
Save bdwyertech/cac234b64fe56fa3d11a81c141e379f8 to your computer and use it in GitHub Desktop.
PowerShell Script to Disable Proxy
# Filename: ProxyDisable.ps1
# Requires an Elevated PowerShell
# Disable the Proxy (Global)
Set-ItemProperty -Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\' -Name 'ProxyEnable' -Value 0
# Unset any Proxy Variables (Local)
$pvars=@('http_proxy','https_proxy', 'no_proxy')
foreach ($pvar in $pvars) {
Remove-Item "ENV:\${pvar}" -ErrorAction SilentlyContinue
}
# Might have to search for and Disable the McAfee Proxy
Stop-Service -Name 'mcpservice' -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment