Last active
March 3, 2023 15:24
-
-
Save bdwyertech/cac234b64fe56fa3d11a81c141e379f8 to your computer and use it in GitHub Desktop.
PowerShell Script to Disable Proxy
This file contains hidden or 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
# 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