Tinus EngOps Wiki

Logo

OpsaC - Operating as PowerShell code

Links

Home

PowerShell Blog

PowerShell Index

PowerShell Search

Additional Websites

View my GitHub Profile

View my GitHub Gists

View Tinus IT Wiki

View my Photo Website

Proxy

tags: PowerShell categories: PowerShell-Basic

Table of Contents

Proxy variables

Thers are many possibilities for proxy addresses in a Windows Server:

System proxy

netsh winhttp show proxy

HTTP proxy

$env:HTTP_PROXY
$env:HTTPS_PROXY

The Problem

Puppet and Chocolatey raise an error, if there a proxy set.

Puppet

Using proxy server 'http://proxy.domain.com:8080'

Chocolatey

[NuGet] Not abel to contact source 'https://myserver.domain.com/source'. The server commited a protocol violation. Section=ResponseStatusLine

Bypass HTTP proxy

$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)

See also

Windows Sysinternals on Microsoft Docs

[ Top ] [ Blog ]