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: Stop Any Service on Windows!

Problem: some system protected services cannot be stopped. PS C:\Users\KingKong> stop-service msmpsvcStop-Service : Service 'Microsoft…

PowerShell: Connect to Office 365 Exchange Online

function disconnectExchangeOnline{ <# manually check sessions PS C:\Windows\system32> Get-PSSession Id Name ComputerName ComputerType State ConfigurationName…

Barracuda Message Archiver & Office 365 Exchange Online Service Account Configuration

The following script grant an Office 365 Exchange online service account necessary permissions on Exchange…