OpsaC - Operating as PowerShell code
published: May 27, 2021 author: Tinu tags: PowerShell categories: PowerShell-Basic
Thers are many possibilities for proxy addresses in a Windows Server:
netsh winhttp show proxy
$env:HTTP_PROXY
$env:HTTPS_PROXY
Puppet and Chocolatey raise an error, if there a proxy set.
Using proxy server 'http://proxy.domain.com:8080'
[NuGet] Not abel to contact source 'https://myserver.domain.com/source'. The server commited a protocol violation. Section=ResponseStatusLine
$env:NO_PROXY
Set the NO_PROXY variable for the current session
$env:NO_PROXY = 'myserver.domain.com'
Set the NO_PROXY variable persistently
[System.Environment]::SetEnvironmentVariable('NO_PROXY','myserver.domain.com',[System.EnvironmentVariableTarget]::Machine)
Windows Sysinternals on Microsoft Docs