Posted On March 29, 2019

PowerShell Dealing with Proxy

kimconnect 0 comments
blog.KimConnect.com >> Codes >> PowerShell Dealing with Proxy
# Direct Access – no proxy
netsh winhttp reset proxy
 
# Set proxy
$proxyString = “http://proxy01:port”
$proxyUri = new-object System.Uri($proxyString)
[System.Net.WebRequest]::DefaultWebProxy = new-object System.Net.WebProxy ($proxyUri, $true)
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Windows 10 Cleanup

Update: there's a new script to cleanup windows here. function cleanWindows{ write-host 'Disabling Windows Media…

Script to Deploy Executables

set InstallRevision=1.0set TargetDir="%ProgramFiles%\Program Name"REM Check to see if the software has been installed. Check for…

PowerShell: Creating Clustered File Shares

# Define Destination Mount Points and UNC Paths $arr=@{} $arr["from"] = @{}; $arr["to"] = @{}…